Shahid commited on
Commit
cbc9574
·
1 Parent(s): 3900b17

modified code

Browse files
Files changed (1) hide show
  1. calculator.py +1 -15
calculator.py CHANGED
@@ -19,18 +19,4 @@ if __name__ == "__main__":
19
  print("3.Multiply")
20
  print("4.Divide")
21
 
22
- choice = input("Enter choice(1/2/3/4): ")
23
-
24
- num1 = float(input("Enter first number: "))
25
- num2 = float(input("Enter second number: "))
26
-
27
- if choice == '1':
28
- print(f"The result is: {add(num1, num2)}")
29
- elif choice == '2':
30
- print(f"The result is: {subtract(num1, num2)}")
31
- elif choice == '3':
32
- print(f"The result is: {multiply(num1, num2)}")
33
- elif choice == '4':
34
- print(f"The result is: {divide(num1, num2)}")
35
- else:
36
- print("Invalid input")
 
19
  print("3.Multiply")
20
  print("4.Divide")
21
 
22
+ print(add(3,5))