Is it a bug of the code playground(on pc)? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Is it a bug of the code playground(on pc)?

I created a program which prints characters in specific shapes.The character is selected randomly. Therefore,I make a comment on top of the code telling the users not to input anything. However,the program asks the user to input everytime,but the input is irrelevant to the output. Finally,I realized the reason is that there is 'input' in the comment '''...''' in the code! When I changed it to 'Input',the program runs flawlessly. I tried 'input' on my phone and it didn't require any input. Running something like ' ' 'input' ' ' print('o') is also not okay. What is the reason behind? Have you guys overcome such problems? You can try to change 'enter' to 'input' in the comment and see what will happen in my program(use pc please) https://code.sololearn.com/cJz279vrDGSI/?ref=app

17th Aug 2019, 2:57 AM
Ketchup🍅
Ketchup🍅 - avatar
3 Answers
+ 7
Looks like you've hit a jackpot. :> Code Playground does not appear to ignore input calls placed in multi-line comments. Not a problem if placed within single-line comments though. The problem exists in both PC and the mobile app. You can report this to SoloLearn via the in-app feedback feature, or through mail. Thanks for the heads up! [email protected]
17th Aug 2019, 3:08 AM
Hatsy Rei
Hatsy Rei - avatar
+ 3
Yes, SL handle input checking some string patterns into client source code and if something match, it ask for input that it sent to SL... Not all function/methods are handled (like getchar in C/C++) and this is very boring... A more direct way to add input is needed (like a check box than ask for it)
17th Aug 2019, 5:53 AM
KrOW
KrOW - avatar
+ 3
And while you're at it, could you also check if input within multi-line comments work in other languages as well on code playground?
17th Aug 2019, 12:32 PM
Sonic
Sonic - avatar