- 3

Write a program to take two integers as input and output their sum. Sample Input: 2 8 Sample Output: 10

Can anyone solve this plzz

10th Oct 2020, 2:44 PM
navya shree
navya shree - avatar
16 Answers
+ 8
Show your attempt first.
10th Oct 2020, 2:46 PM
Pranav
Pranav - avatar
+ 3
Try it in the code playground and see if it is correct or not.
10th Oct 2020, 2:58 PM
Pranav
Pranav - avatar
10th Oct 2020, 2:53 PM
Jayakrishna 🇮🇳
+ 1
navya shree use play ground to see correct or not. It will print 10. But not take user input.. And X, x case sensitive matters
10th Oct 2020, 3:02 PM
Jayakrishna 🇮🇳
+ 1
x = int(input()) y = int(input()) print(x+y) """navya shree Now run this program and in pop-up give inputs like 8 (press enter) 2 (press submit) """
10th Oct 2020, 4:20 PM
Jayakrishna 🇮🇳
0
X=2 print (x) print(x+8) print(x)
10th Oct 2020, 2:48 PM
navya shree
navya shree - avatar
0
Which language is to use
10th Oct 2020, 2:50 PM
Tim Don👨🏾‍💻🤟
Tim Don👨🏾‍💻🤟 - avatar
0
something like this? https://docs.python.org/3/library/functions.html#sum
10th Oct 2020, 2:50 PM
Steven M
Steven M - avatar
0
X=2+8 print (x) Is this correct or not?
10th Oct 2020, 2:57 PM
navya shree
navya shree - avatar
0
navya shree yes that should work and the below should work as well, but remember that X != x ''' x=int(input()) y=int(input()) print(x+y) '''
10th Oct 2020, 3:01 PM
Steven M
Steven M - avatar
0
I tried ...but I dint get result....Steven M
10th Oct 2020, 3:08 PM
navya shree
navya shree - avatar
0
PÃŁŁÃVÎ JHÁ ,tq so much fo u hlp ...but when I type that code I got testcase failed ...what it means ..?? ...
10th Oct 2020, 3:26 PM
navya shree
navya shree - avatar
0
Jayakrishna🇮🇳 tq so much ....thanks a lot ....now its sorted .....
10th Oct 2020, 4:24 PM
navya shree
navya shree - avatar
0
# your code goes here x = int(input()) y = int(input()) z = x+y print(z) #This works for me... All the Test Case 1-5 was sorted at once with this code
15th Mar 2021, 1:39 AM
Oluwatosin Oyinlade