-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathQuadratics.py
42 lines (26 loc) · 991 Bytes
/
Quadratics.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#A simple Program that automically adds the variable on at the start of the calculation in the same unit
def variable(x):
x = (int(x))
x = x**2
xword = (str(x))
print(xword+" is your Variable!!")
print("Now we will move onto the calculating unit")
number1=(int(input("Please enter your First Number")))
number2=(int(input("Please enter your Second Number")))
choice=input("Would you like to Add, Subtract, Multiply or Divide? (Use Symbols)")
if choice == "+":
answer1 = x+number1+number2
print (answer1)
elif choice == "-":
answer2 = x-number1-number2
print (answer2)
elif choice == "x":
answer3 = x*number1*number2
print (answer3)
elif choice == "÷":
answer4 = x/number1/number2
print (answer4)
else:
print("ERROR")
variable2=(input("Please enter your Variable"))
variable(variable2)