This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org 100h | |
jmp start ; jump over data declaration | |
msg: db "1-Add",0dh,0ah,"2-Multiply",0dh,0ah,"3-Subtract",0dh,0ah,"4-Divide", 0Dh,0Ah, '$' | |
msg2: db 0dh,0ah,"Enter First No: $" | |
msg3: db 0dh,0ah,"Enter Second No: $" | |
msg4: db 0dh,0ah,"Choice Error $" | |
msg5: db 0dh,0ah,"Result : $" | |
msg6: db 0dh,0ah ,'thank you for using the simple calculator! press any key to exit... ', 0Dh,0Ah, '$' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generateHashtag (str) { | |
// remove unnecessary spaces and make words capitalize | |
function capitaLize(string) { | |
if (string) { | |
return string.replace(/^./, string[0].toUpperCase()); | |
} | |
} | |
// remove extra spaces from both sides of a string. | |
const actualString = str.trim(); | |
if (actualString) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
id: "0d548577-28e4-5f77-b925-6074da6986d0", | |
name: "Lizzie Park", | |
hash: "681aba0a4bb59e15ba2bd7830856bd9e", | |
number: "(536) 499-4520", | |
email: "[email protected]", | |
address: !1 | |
}, { | |
id: "c47e28f2-e971-5144-a340-b9ea777b33f5", | |
name: "Lucinda Wade", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"quotes": [ | |
{ | |
"quote":"Life isn’t about getting and having, it’s about giving and being.","author":"Kevin Kruse"}, | |
{ | |
"quote":"Whatever the mind of man can conceive and believe, it can achieve.","author":"Napoleon Hill"}, | |
{ | |
"quote":"Strive not to be a success, but rather to be of value.","author":"Albert Einstein"}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def bst_insert(root, node): | |
last_node = None | |
current_node = root | |
while current_node is not None: | |
last_node = current_node | |
if node.data < current_node.data: | |
current_node = current_node.left | |
else: | |
current_node = current_node.right |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def average(L): | |
if not L: | |
return None | |
return sum(L)/len(L) | |
def test_average(): | |
test_cases = [ | |
{ | |
"name": "simple case 1", | |
"input": [1, 2, 3], |