+ 4

Could you please explain why?

I posted the following code yesterday..I have checked it with python IDLE and there was no errors and everything was fine...But when I'm trying to share the the code in SoloLearn, there was an EOFError in code playground and the repetition breaks after one loop..Could someone please explain the reason behind it? p.s.: First I developed the code in python 2.7 and then converted it into python 3 https://code.sololearn.com/cDS85s3JrMM2/?ref=app

10th Mar 2018, 7:54 AM
Amila Chinthaka
Amila Chinthaka - avatar
4 Answers
+ 10
It works fine if you enter all possible runtime inputs when prompted (including the escape sequence -1)
10th Mar 2018, 8:00 AM
jay
jay - avatar
+ 8
You get the EOF error probably because Sololearn's code playground only lets you submit input once, processes it in an online compiler and sends the result, so the problem is the loop that continuously asks for input
10th Mar 2018, 7:57 AM
David Akhihiero
David Akhihiero - avatar
+ 6
Thaanks a lot Yerucham!!
10th Mar 2018, 8:04 AM
Amila Chinthaka
Amila Chinthaka - avatar
+ 5
Thanks a lot jay!!...I tried it...and I got the expected answer:-)...Thank you both:-)
10th Mar 2018, 8:05 AM
Amila Chinthaka
Amila Chinthaka - avatar