Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print ("Hi, I am Evelyn, your personal bot. Let's get started.")
- users_name = input("What is your name?")
- print ("Welcome, " + users_name + "!")
- print ("Let's do some calculations! I like addition.")
- # Addition with 2 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)
- # Addition with 3 numbers
- print ("We can also do some advanced calculations. First, let's add three numbers!")
- input3 = input("Number 3:")
- input4 = input("Number 4:")
- input5 = input("number 5:")
- number3 = int(input3)
- number4 = int(input4)
- number5 = int(input5)
- result = number3 + number4 + number5
- output = str(result)
- print (input3 + "+" + input4 + "+" + input5 + " = " + output)
- # Subtraction with 2 numbers
- print ("I can also do subtractions.")
- input6 = input("Number 6:")
- input7 = input("Number 7:")
- number6 = int(input6)
- number7 = int(input7)
- result = number6 - number7
- output = str(result)
- print (input6 + "-" + input7 + " = " + output)
- # Squares
- print ("I'm also very good at squares. I can show you right now.")
- input8 = input("Number 8:")
- number8 = int(input8)
- result = number8 * number8
- output = str(result)
- print (input8 + "*" + input8 + "=" + output)
- # area of a circle
- print ("One of my awesome skills is calculating stuff you can't do in your head. Let's find out the area of a circle!")
- input9 = input("Please tell me the radius of the circle...")
- number9 = int(input9)
- number10 = float(3.1415926)
- input10 = str(number10)
- result = number10 + number9 + number9
- output = str(result)
- print (input10 + " * " + input9 + " * " + input9 + " = " + output)
- print ("See? Calculating is definitely one of my strong sides.")
- # asking the user
- print ("I have more skills.")
- input11 = input("What do you wnat to do now?")
- # Addition with 2 numbers
- if input11 == "Addition" or input11 == "Adding" or input11 == "add":
- input12 = input("Number 1:")
- input13 = input("Number 2:")
- number9 = int(input12)
- number10 = int(input13)
- result = number1 + number2
- outcome = str(result)
- print (input12 + "+" + input13 + "=" + outcome)
- # Subtraction with 2 numbers
- elif input11 == "Subtraction" or input11 == "Subtracting" or input11 == "subtract":
- input14 = input("Number 1:")
- input15 = input("Number 2:")
- number11 = int(input14)
- number12 = int(input15)
- result = number3 - number4
- outcome = str(result)
- print (input14 + "-" + input15 + "=" + outcome)
- # Multiplication with 2 numbers
- elif input11 == "Multiplication" or input11 == "Multiplying" or input11 == "multiply":
- input16 = input("Number 1:")
- input17 = input("Number2:")
- number13 = int(input16)
- number14 = int(input17)
- result = number13 * number14
- outcome = str(result)
- print (input16 + "*" + input17 + "=" + outcome)
- # Division with 2 numbers
- elif input11 == "Division" or == input11 == "Dividing" or input11 == "divide":
- input18 = input("Number 1:")
- input19 = input("Number 2:")
- number15 = int(input18)
- number16 = int(input19)
- result = number15 / number16
- outcome = str(result)
- print (input18 + "/" + input19 + "=" + outcome)
- # Every other answer
- else:
- print ("Sorry, I don't understand that. Please try again.")
- print ("Very good. I like math.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement