+ 6

How to resolve input error in CODE PLAYGROUND

In code playground we only get to input something at the start. I m developing a quiz game in PYTHON which asks a question and than the user has to enter its answer. I have already made half of the game in my python IDLE 2.3.3. Its working perfectly there. But in code playground it asks for input before asking the question. In that case the game wont have any meaning. If anyone else has such a problem please vote this question...

31st Mar 2017, 12:09 PM
Ritik Pal
Ritik Pal - avatar
6 Respuestas
+ 12
@Winter can you share your code please?
31st Mar 2017, 11:51 AM
Dev
Dev - avatar
+ 2
Moataz. The input problem is the major problem. This problem exist for all other programming language here. I just want to know how it will display output before asking for inputs.
31st Mar 2017, 12:17 PM
Ritik Pal
Ritik Pal - avatar
+ 1
Dayve. Ihave fixed the Syntax error. But the problem is, it asks for input before giving the output. you may find this error in any program u type. For example, x=input('What is your age') if x >18: print('You are adult') This code will ask for input first when you run it in code playground and than give all the output.
31st Mar 2017, 12:14 PM
Ritik Pal
Ritik Pal - avatar
0
Please know that the playground is using python3. So if your IDLE is python2, make sure you change your code to match python3 before pasting it in the playground.
31st Mar 2017, 12:13 PM
Moataz El-Ibiary
Moataz El-Ibiary - avatar
0
Yes, the playground takes all the inputs at once (at the start of the program) , but it will enter it once after another
31st Mar 2017, 12:39 PM
Moataz El-Ibiary
Moataz El-Ibiary - avatar
0
I'm facing the same problem with my program. Did anyone resolve it?
3rd Jul 2017, 8:00 AM
Shreejit Jadhav
Shreejit Jadhav - avatar