-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathBASIC_CALCULATOR.py
40 lines (28 loc) · 1.06 KB
/
BASIC_CALCULATOR.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
import time
print("Welcome to the simple calculation")
time.sleep(1)
print("additon -- 1")
print("subration -- 2")
print("multiply -- 3")
print("division -- 4")
time.sleep(2)
def main():
Selection = input("Select any number for your calculation:")
number_1 = int(input("Enter First number:"))
number_2 = int(input("Enter Second number:"))
if Selection == '1':
print("Addition of your two number is ",number_1+number_2)
elif Selection == '2':
print("subration of your two number is ",number_1-number_2)
elif Selection == '3':
print("Multiply of your two number is ",number_1*number_2)
elif Selection == '4':
print("division of your two number is ",number_1/number_2)
recalculation = input("Do You want to calculate Again ??? (yes/no) ").lower()
if recalculation == "yes":
main()
else:
print("bye")
exit()
time.sleep(5)
main()