@AyushMalhotra/

Multiple integer calculator

Python

No description

fork
loading
Files
  • main.py
main.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
num1= input ("Enter first number!")
num2= input ("Enter second number!")
num3 = input ("Enter third number!")
num4= input ("Enter fourth number!")

num1 = float(num1)
num2 = float(num2)
num3 = float(num3)
num4 = float(num4)

op1=input("Enter first operation! (-,+, /,*)")
op2=input("Enter second operation!")
op3=input("Enter third operation!")

if op1 == "+"
  print(num1 + num2)

if op1 == "-"
  print(num1 - num2)

if op1 == "/"
  print(num1 / num2)

if op1 == "*"
  print(num1 * num2)


if op1 == "+" and op2 ==  "+" and op3 == "+":
  print(num1+ num2 + num3 + num4)