Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Hi, I am Skynet, your AI program.")
- users_name=input("Enter your name please: ")
- print("Welcome " + users_name + "!")
- print("Let's start out with some simple Maths")
- print("Lets add two numbers")
- input1 = input("Input first number: ")
- input2 = input("Input 2nd number: ")
- number1 = int(input1)
- number2 = int(input2)
- result = number1 + number2
- #print(result)
- total=str(result)
- print(input1 + "+" + input2 + "=" + total)
- print("Lets add a thrid number to the result")
- input3 = input("Input 3rd number: ")
- number3 = int(input3)
- third_number_result = result + number3
- third_number_total = str(third_number_result)
- print("The addition of the third number " + input3 + " to the previous result " + total + " is equal to " + third_number_total)
- print("I will also subtract all three numbers in the order you gave me")
- sub = number1 - number2 - number3
- sub_total=str(sub)
- print("The subtraction result of the three numbers is " + sub_total)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement