0

Guessing Game - Playground Problem

Hey there, awesome community ;) I just got into learning to code this week - thanks to everybody that made such enlightening comments on Phyton course lessons, those were very valuable to me. Thing is, I Finished typos lesson and decided to tinker with things taught so far, resulting in the code hosted at link below: http://pastebin.com/d32PaRVR It runs fine on IDLE, but not on playground - and I really wish to know why. BTW, it's my first functional code (the very first thing I ever typed on IDLE that haven't returned me some exception), so please bear with it's crapness. I'd be very grateful to anyone that could give me some hint on optimization, as I believe it's best to begin being used to optimal thinking from start. Thanks in advance :D

18th Dec 2016, 2:43 PM
JĂ´natas Silveira de Andrade
JĂ´natas Silveira de Andrade - avatar
3 Answers
+ 2
1) copy code to playground, 2) run it, 3) console will print code errors, 4) fix errors 5) profit if you want us to help you, give us a link to the code in the playground.
18th Dec 2016, 2:50 PM
Vladimir Honcharenko
Vladimir Honcharenko - avatar
+ 1
Unfortunately, your game will not work in Sololearn playground correctly, because their interpreter collects all incoming data before starting the program, and then inserts them into the right places. If you type the following text in the pop-up window, the exception does not occur: SpamAndEggs exit
18th Dec 2016, 10:07 PM
Vladimir Honcharenko
Vladimir Honcharenko - avatar
0
Vladimir, thx for taking your time. Here you go (Playground Link): https://code.sololearn.com/clJj76FHg6od/ It's returning an EOF exception, but on playground only - the .py file runs just fine.
18th Dec 2016, 9:46 PM
JĂ´natas Silveira de Andrade
JĂ´natas Silveira de Andrade - avatar