0

Why this code isn't working in SoloLearn compiler (in mobile version at least)?(There is no output at all)

You enter sentence that need to be changed. Code make all letters in default cases uppercased. It asks you if there any other words in your sentence that need to be changed. If yes you enter you enter this word , if no it just shows the result. And here is the problem. When you enter yes(y) and your word it doesn't work. https://code.sololearn.com/c63e54Am2Ts9/?ref=app

1st Jan 2019, 9:49 AM
San Gvinik
3 Antworten
+ 1
Sololearn compiler will only show the final result of the code, so it doesnt support that kind of while loop that needs user input to exit, because you must input everything at the beginning when you tap run!
1st Jan 2019, 12:22 PM
Sekiro
Sekiro - avatar
0
You don't get it. If your input will look like that : Sentence -> first input n ->second input --> to get out from loop!!!!! You write everything in different rows and it means that these are different inputs. And it will work!!!!! It understands such inputs. Yes , you need to write everything at one time , but you can write 2 or more inputs. Get it? However , It doesn't work if your inputs will look like that: Sentence -> first input y ->second input Your word ->third input n -> fourth input Or I don't understand what you are trying to say.
1st Jan 2019, 12:59 PM
San Gvinik
0
Yes, it is as you say, but again you should take all the input outside of the loops or if-else statment condition, the playground probably cannot take some input nested inside loops nested inside some conditional statement... In fact it only works if you input: sentence n in other case as you said above doesnt work.
1st Jan 2019, 1:51 PM
Sekiro
Sekiro - avatar