Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Hi, i am Nuras, your personal bot.")
- command = input("How can i help you >")
- if command == "add":
- print("Let's add some number")
- input1 = input("Number 1>")
- input2 = input("Number 2>")
- number1 = int(input1)
- number2 = int(input2)
- result = number1 + number2
- output = str(result)
- print(input1 + "+" + input2 + "=" + output)
- elif command == "subtract":
- print("Let's subtract some number")
- input1 = input("Number 1>")
- input2 = input("Number 2>")
- number1 = int(input1)
- number2 = int(input2)
- result = number1 - number2
- output = str(result)
- print(input1 + "-" + input2 + "=" + output)
- elif command == "multiply":
- print(" Let's multiply numbers")
- input1 = input("Number 1>")
- input2 = input("Number 2>")
- number1 = int(input1)
- number2 = int(input2)
- result = number1 * number2
- output = str(result)
- print(input1 + "*" + input2 + "=" + output)
- elif command == "divide":
- print(" Let's Divide numbers")
- input1 = input("Number 1>")
- input2 = input("Number 2>")
- number1 = int(input1)
- number2 = int(input2)
- result = number1 / number2
- output = str(result)
- print(input1 + "/" + input2 + "=" + output)
- else:
- print("sorry i dont understand")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement