python input | SoloLearn: Learn to code for FREE!

+2

python input

x = input (x) y = input (y) print (x+y) what's the problem?

7/29/2018 2:57:42 AM

Life1219

10 Answers

New Answer

+17

x = int(input()) y = int(input()) print (x+y)

+14

Life1219 that's because of not giving proper number of inputs. One minute, I'll make a post to show that EDIT ~ https://www.sololearn.com/post/20154/?ref=app

+12

Life1219 do you get any errors?

+10

Life1219 you have to input in 2 separate lines, like, 1 2 or let me now what input u are giving.

+8

Life1219 when the code asks for input, write a number (or a string would work too) and then press enter. Then give your second number or a string on the second line.

+6

x = input() y = input() print(x+y)

+6

yash Nikhil Nikhil Dhama thanks. now i know.

+5

Nikhil EOFerror

+3

NezhnyjVampir yash Nikhil Dhama I used code playground. but it doesn't work.

+2

Nikhil Dhama it isn't work, too.