Couldn't able to give the input for the second time? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Couldn't able to give the input for the second time?

8th Jun 2017, 9:32 AM
Gomathi Subramanian
Gomathi Subramanian - avatar
8 Answers
+ 10
For Code Playground compiler, you need to provide all input prior to compilation. E.g. If your program requires two input, split multiple inputs into different lines: 30 2 This will feed two input into the program.
8th Jun 2017, 9:34 AM
Hatsy Rei
Hatsy Rei - avatar
+ 8
It works perfectly for me? The output in your example would be: Enter a number: 5.0 Enter another number: 8.0 13.0
8th Jun 2017, 9:52 AM
Hatsy Rei
Hatsy Rei - avatar
+ 8
Look, if you still haven't fixed it, you'll need to provide more info on the error message. There is probably somewhere you went wrong typing this code you provided correctly, but without the full error message, nobody would know what went wrong, where.
9th Jun 2017, 12:19 AM
Hatsy Rei
Hatsy Rei - avatar
+ 7
What error is thrown?
8th Jun 2017, 10:04 AM
Hatsy Rei
Hatsy Rei - avatar
0
x = float(input("Enter a number: ")) print(x) y = float(input("Enter another number: ")) print(y) print(x + y) then your input should by split by enter: 5 8 I tried with this code too... but I couldn't able to produce output for this too
8th Jun 2017, 9:37 AM
Gomathi Subramanian
Gomathi Subramanian - avatar
0
yes but that is not shown instead error is thrown
8th Jun 2017, 9:59 AM
Gomathi Subramanian
Gomathi Subramanian - avatar
0
invalid syntax error is thrown
8th Jun 2017, 1:29 PM
Gomathi Subramanian
Gomathi Subramanian - avatar
0
traceback error and eof really line error...
9th Jun 2017, 12:47 AM
Gomathi Subramanian
Gomathi Subramanian - avatar