+ 1

Little help with Python

Can someone please help me with something. I started to write my first code (you can see it on my profile) and I´m having few issues. The problem is that when I run the code it behaves differently here on SoloLearn, Codecademy, some other online IDE and PyCharm that I have on my PC. Meaning that it produces error on SoloLearn and Codecademy and works the way I intended on PyCharm and online IDE. Can someone please explain me why is that because I´m not sure now if there is an error in my code or something is wrong here on SoloLearn Code Playground. The second issues is that I would like to know is it possible in the first part of my code where all the "print" statements are to write a code in a way that it prints line by line by pressing enter from the user and not all print lines right away? Thanks, Goran

6th Aug 2017, 4:39 PM
Goran
4 odpowiedzi
+ 7
This is what we call the Code Playground limitation on console app user input. You have to feed all input to your code prior to code interpretation. Split multiple inputs into different lines, e.g. If code requires two integer inputs: 2 3
6th Aug 2017, 4:50 PM
Hatsy Rei
Hatsy Rei - avatar
0
Thank you Hatsy. Now only one issue is left to be answered.
6th Aug 2017, 5:12 PM
Goran
0
if you replace "print" with "input" at these lines where you want to wait, then the user has to press enter before the next statement is printer - sounds like that is what you are looking for
6th Aug 2017, 6:08 PM
Martin Ed
Martin Ed - avatar
0
Thanks for the answer Martin. I have already done like that but that way leaves an option for the user to actually write something before he/she enters "enter" and in that way making a mess of a code.
6th Aug 2017, 6:15 PM
Goran