SHARE
TWEET

Untitled

a guest Jan 26th, 2020 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # This is my program
  2. # Roland Beton
  3. print("Hi, I am Marvin, your personal bot. V2")
  4. users_name = input("Please enter your name: ")
  5. print("Hi there "+ users_name)
  6.  
  7. todo = input("What would you like to do [add, multiply, subtract, divide]?: ")
  8. if todo == "add" or todo =="Add" or todo == "Plus":
  9.     print("Lets add some numbers")
  10.     input1 = int(input("Number 1> "))
  11.     input2 = int(input("Number 2> "))
  12.     result = input1 + input2
  13.     print(str(input1) +"+"+ str(input2) +"="+ str(result))
  14. elif todo == "multiply" or todo == "Multiply":
  15.     print("Lets multiply some numbers")
  16.     input1 = int(input("Number 1> "))
  17.     input2 = int(input("Number 2> "))
  18.     result = input1 * input2
  19.     print(str(input1) +"*"+ str(input2) +"="+ str(result))
  20. elif todo == "subtract" or todo == "Subtract":
  21.     print("Lets subtract some numbers")
  22.     input1 = int(input("Number 1> "))
  23.     input2 = int(input("Number 2> "))
  24.     result = input1 - input2
  25.     print(str(input1) + "-" + str(input2) + "=" + str(result))
  26. elif todo == "divide" or todo == "Divide":
  27.     print("Lets divide some numbers")
  28.     input1 = int(input("Number 1> "))  # type: int
  29.     input2 = int(input("Number 2> "))
  30.     result = input1 / input2
  31.     print(str(input1) + "/" + str(input2) + "=" + str(result))
  32. else:
  33.     print("Lets square a number")
  34.     input1 = int(input("Number > "))
  35.     result = input1 * input1
  36.     print(str(input1) + "*" + str(input1) + "=" + str(result))
  37.  
  38.  
  39. print('Goodbye :)')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top