forked from aramb-dev/Unimaginable-Python-Projects
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CalcPRO+.py
34 lines (29 loc) · 1.11 KB
/
CalcPRO+.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
print("Welcome to the PRO version of Calculator+! This calculator\nhas the ability to add, subtract, multiply,\ndivide. Remember that multiple numbers are not compatible with division. This calculator is only compatible with four numbers.")
num1 = float(input("First Number?"))
op = input("Enter operator, ex. +, -, *, /:")
num2 = float(input("Second Number?"))
num3 = float(0)
num4 = float(0)
neednum1 = ()
neednum = input("Do you need another number? yes or no for our server is case sensitive. :)")
if neednum == "yes":
num3 = float(input("Third Number?"))
neednum1 = input("Do you need another number? yes or no for our server is case sensitive. :)")
elif neednum == "no":
print()
if neednum1 == "yes":
num4 = float(input("Fourth Number?"))
elif neednum == "no":
print()
if op == "+":
print(num2 + num1 + num3 + num4)
elif op == "-":
print(num1 - num2 + num3 - num4)
elif op == "*":
print(num2 * num1 * num4 * num3)
elif op == "/":
print(num1 / num2)
else:
print("You have entered an incorrect character.")
print("To restart, you will need to re-run your calculator.")
exit()