Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Hi, I am a Math Whiz.")
- users_name=input("What is your name? ")
- print("Hi "+users_name+" Let's do some Math")
- print("Let's add three numbers together.")
- input1=input("Number 1> ")
- input2=input("Number 2> ")
- input3=input("Number 3> ")
- number1=int(input1)
- number2=int(input2)
- number3=int(input3)
- result=number1+number2+number3
- output=str(result)
- print(input1+"+"+input2+"+"+input3+"="+output)
- print("Good job "+users_name)
- print("Now let's do a subtraction problem.")
- input1=input("Number 1> ")
- input2=input("Number 2> ")
- number1=int(input1)
- number2=int(input2)
- result=number1-number2
- output=str(result)
- print(input1+"-"+input2+"="+output)
- print("Good job "+users_name)
- print("Now let's calculate the area of a square.")
- input1=input("Please enter the length of one side of the square> ")
- number1=int(input1)
- result=number1*number1
- output=str(result)
- print("The area of the square = "+output)
- print("Good job "+users_name)
- print("Now let's calculate the sale price of an item.")
- input1=input("What is the original price of the item?> ")
- input2=input("What is the percentage discount on the item?> ")
- number1=int(input1)
- number2=int(input2)
- discount=number1*(number2/100)
- result=number1-discount
- prtdiscount=str(discount)
- output=str(result)
- print("The amount you will save on this item is "+prtdiscount)
- print("Your final price for this item is "+input1+"-"+prtdiscount+"="+output)
- print("Good job "+users_name)
- print("Have a nice day. Good Bye")
- Hi, I am a Math Whiz.
- What is your name? Sue
- Hi Sue Let's do some Math
- Let's add three numbers together.
- Number 1> 1
- Number 2> 2
- Number 3> 3
- 1+2+3=6
- Good job Sue
- Now let's do a subtraction problem.
- Number 1> 90
- Number 2> 5
- 90-5=85
- Good job Sue
- Now let's calculate the area of a square.
- Please enter the length of one side of the square> 7
- The area of the square = 49
- Good job Sue
- Now let's calculate the sale price of an item.
- What is the original price of the item?> 100
- What is the percentage discount on the item?> 10
- The amount you will save on this item is 10.0
- Your final price for this item is 100-10.0=90.0
- Good job Sue
- Have a nice day. Good Bye
- >>> Sue
- ---------- FINISHED ----------
- exit code: 2 status: 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement