Input in loops | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Input in loops

Regarding this piece of code I'm trying to work out here - https://code.sololearn.com/c5oj1s2e79DS/#py Can this sort of loop-input game actually work with just a basic code parser like SoloLearn here uses, or would that require a more sophisticated platform? It runs just fine to start with, but after the first input and loop it returns an EOF error and cuts out.

16th Apr 2017, 4:12 PM
Amy
Amy - avatar
3 Answers
+ 2
that is a flaw in sololearn playground. it can't handle games like this. it can do multiple input but they have to all be entered at startup which doesn't do much good for a game that adjusts second guess after getting results of first guess.
16th Apr 2017, 4:20 PM
LordHill
LordHill - avatar
+ 2
Okay, I had a feeling that might have been the issue. That's fine though! It's still an amazing free tool to have access to for basic entry work. Thanks for the confirmation!
16th Apr 2017, 4:21 PM
Amy
Amy - avatar
0
have you considered it going the other way? you pick a number and let the computer loop figure out what it was? check my code, I did this the other day. AI Guessing game
16th Apr 2017, 4:22 PM
LordHill
LordHill - avatar