• Sign Up
• Login
• API
• FAQ
• Tools
• Archive
SHARE
TWEET # Math1 a guest Apr 23rd, 2019 85 in 3 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. print("This is a math helper program")
2. print("Please Select the Operation to perfor:\n")
3. print(" 1> Add")
4. print(" 2> Substract")
5. print(" 3> Area of Square")
6.
7. V_OPERATION = int(input("\nSelected Option: "))
8.
9. if V_OPERATION == 1 :
10.     print("Operation Selected is Add")
11.     VALUE1 = int(input("Insert the first number: "))
12.     VALUE2 = int(input("Insert the Second number: "))
13.     RESULT = VALUE1 + VALUE2
14.     print(str(VALUE1) + " + " + str(VALUE2) + " = " + str(RESULT) )
15.
16. elif V_OPERATION == 2 :
17.     print("Operation Selected is Sustract")
18.     VALUE1 = int(input("Insert the first number: "))
19.     VALUE2 = int(input("Insert the Second number: "))
20.     RESULT = VALUE1 - VALUE2
21.     print(str(VALUE1) + " - " + str(VALUE2) + " = " + str(RESULT) )
22.
23. elif V_OPERATION == 3 :
24.     print("Operation Selected is Area")
25.     FACE_A = int(input("Please provide le lenght of the square: " ))
26.     print("The area is " + str(FACE_A ** 2) )
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.

Top