-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcalc.py
More file actions
25 lines (23 loc) · 750 Bytes
/
calc.py
File metadata and controls
25 lines (23 loc) · 750 Bytes
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
print("1----addittion-----")
print("2----subtraction----")
print("3----multiplication---")
print('4-----division------')
print("5-----exit--------")
while True:
a=int(input("enter your first number:-"))
b=int(input("enter your second number:-"))
choice=int(input("enter your choice(1-5):-"))
if choice==1:
print(f"This is addition {a+b}")
elif choice==2:
print(f"This is subtraction {a-b}")
elif choice==3:
print(f"This is multiplication {a*b}")
elif choice==4:
print(f"This is division {a/b}")
elif choice==5:
print("exit Thank you.....")
else:
print("choose invalid option choose correct option")
break
print("----THANK YOU-----")