0
Couldn't able to give the input for the second time?
8 ответов
+ 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.
+ 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
+ 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.
+ 7
What error is thrown?
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
0
yes
but that is not shown instead error is thrown
0
invalid syntax error is thrown
0
traceback error and eof really line error...