+ 1

Write a program to take two integers as input and output their sum.

Sample Input: 2  8  Sample Output:  10

4th Mar 2021, 4:51 PM
Sandeep Durge
Sandeep Durge - avatar
5 ответов
+ 6
2 comments from me: ▪︎Sandeep Durge has done nearly the complete python core tutorial, so i am sure he is able to solve this simple task. ▪︎so please do not give people ready codes, as this does no really help the op. better to give some hints and tips to the op, so that he can learn from this. Thanks!
4th Mar 2021, 5:37 PM
Lothar
Lothar - avatar
+ 1
x = int(input()) y = int(input()) result = x+y print(result)
4th Mar 2021, 4:53 PM
▲TopGun ▲
▲TopGun ▲ - avatar
+ 1
Ok, Lothar sorry for doing that. It's not gonna happen anymore. 🤝
4th Mar 2021, 9:04 PM
▲TopGun ▲
▲TopGun ▲ - avatar
0
# your code goes here sum = int (input (6, +3)) print (sum)
4th Mar 2021, 5:08 PM
Sandeep Durge
Sandeep Durge - avatar
0
a = int(input()) b = int(input()) print(a+b) The input must be integer so int is used, by giving the first input a variable name it allows you to call it into the program to do addition
6th Mar 2021, 12:42 AM
Gemma W
Gemma W - avatar