0

Help me please this is python 3

Write a program to take two integers as input and output their sum. Sample Input: 2 8 Sample Output: 10 __________________ my trying num1=float(input("enter first number")) op=input("enter operator") num2=float(input("enter second number")) if op =="+": print(num1+num2) else: False

18th Oct 2020, 11:18 PM
Bushra Haitham
Bushra Haitham - avatar
2 ответов
+ 5
Bushra Haitham Just do it like this x = int(input()) y = int(input()) print (x+y)
19th Oct 2020, 12:08 AM
Simba
Simba - avatar
0
The question doesn't say to take an operator input. It wants 2 inputs, and output their sum.
18th Oct 2020, 11:41 PM
你知道規則,我也是
你知道規則,我也是 - avatar