Skip to content
This repository was archived by the owner on Nov 30, 2022. It is now read-only.

Commit 5c22945

Browse files
committed
Update Simple_calculator.py
1 parent cb87b65 commit 5c22945

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

Basic-Scripts/Simple_calculator.py

-32
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,3 @@
1-
operation = input('''
2-
Please type in the math operation you would like to complete:
3-
1 for addition
4-
2 for subtraction
5-
3 for multiplication
6-
4 for division
7-
''')
8-
9-
num = int(input('Enter your first number: '))
10-
num2 = int(input('Enter your second number: '))
11-
12-
if operation == '1':
13-
print('{} + {} = '.format(num, num2))
14-
print(num+num2)
15-
16-
elif operation == '2':
17-
print('{} - {} = '.format(num, num2))
18-
print(num-num2)
19-
20-
elif operation == '3':
21-
print('{} * {} = '.format(num, num2))
22-
print(num*num2)
23-
24-
elif operation == '4':
25-
print('{} / {} = '.format(num, num2))
26-
print(num / num2)
27-
28-
else:
29-
print('Wrong Input! Please Try Again")
30-
31-
32-
331

342

353
"""The previous script becomes very boring for the user as he has to keep on typing just numbers and of wants to interact using

0 commit comments

Comments
 (0)