Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Hi, I am the bot that Sue created.")
- print("Let's get started.")
- users_name=input("What is your name? ")
- print("Welcome "+users_name)
- addsub=input("Please press a if you would like to add, s if you would like to subtract, m if you would like to multiply, or d if you would like to divide. ")
- input1=input("Number 1> ")
- input2=input("Number 2> ")
- number1=int(input1)
- number2=int(input2)
- if addsub=="a" or addsub=="A" or addsub=="plus" or addsub=="Plus" or addsub=="add" or addsub=="Add":
- result=number1+number2
- output=str(result)
- print(input1+"+"+input2+"="+output)
- elif addsub=="s" or addsub=="S" or addsub=="minus" or addsub=="Minus" or addsub=="subtract" or addsub=="Subtract":
- result=number1-number2
- output=str(result)
- print(input1+"-"+input2+"="+output)
- elif addsub=="m" or addsub=="M" or addsub=="times" or addsub=="Times" or addsub=="multiply" or addsub=="Multiply":
- result=number1*number2
- output=str(result)
- print(input1+"*"+input2+"="+output)
- elif addsub=="d" or addsub=="D" or ddsub=="divide" or addsub=="Divide":
- result=number1/number2
- output=str(result)
- print(input1+"/"+input2+"="+output)
- else:
- print(addsub+" is not a valid answer. I do not know if I should add, subtract, multiply, or divide. Please Try again.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement