+ 1
Jungle camping
3/5 tests correct Need help https://code.sololearn.com/c0euQs27oat7/?ref=app
3 Respostas
+ 5
A little late but I did want to show you a simpler method to solve the challenge using a while and a switch statement.
https://code.sololearn.com/cX4kvLvPQJAX/?ref=app
+ 1
This might help you.
Although the code executes for almost all the possible inputs, it is not a right way of writing. It crashes when value of 'i' in while loop is increased.
https://code.sololearn.com/cgTHJW5IcSC0/?ref=app
0
Hint:
You can simply iterate through the input string, separate it into tokens and use if statements to print the new strings directly. No need to complicate the code unnecessarily