-
Notifications
You must be signed in to change notification settings - Fork 1
/
Algebra-Relations.py
41 lines (25 loc) · 987 Bytes
/
Algebra-Relations.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
#A simple Program that automically adds the variable on at the start of the calculation in the same unit
def variable(x):
print(x+" is your Variable!!")
print("Now we will move onto the calculating unit")
x = (float(x))
number1=(float(input("Please enter your First Number")))
number2=(float(input("Please enter your Second Number")))
choice=input("Would you like to Add, Subtract, Multiply or Divide? (Use Symbols)")
choice = choice.lower()
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)