+ 2

Jungle Camping - Code Coach Issue

Hi! Could anyone give me advice on solving Code Coach’s Jungle Camping task? I’ve tried my best but still for no avail. 4/5 tasks completed with my code (having issue with task #3). The code is pinned to the post (python). Thanks in advance. https://code.sololearn.com/c08H04A0O9W5/?ref=app

29th Feb 2020, 10:30 PM
Engels
Engels - avatar
5 Respostas
0
For one, chirp is misspelled
29th Feb 2020, 10:33 PM
Pete Cowling
Pete Cowling - avatar
+ 2
it is perfectly fine right now. you can lose the str() at input() all input in Python is always a string so no need to type cast it from string to string ;) for doing these shorter exercises it is fine to use variables such as n and o but it is good practice to give them proper variable names. right now it doesn’t matter, but when your code grows in length, or when coming back to code after some time, or when working together with others, variable naming will be key
29th Feb 2020, 10:52 PM
Brave Tea
Brave Tea - avatar
+ 1
Oh god, i’m blind. Thank you, Peter. Btw, since i’ve asked anyway, how can i improve this code? Was it solved adequately? Just started with programming.
29th Feb 2020, 10:37 PM
Engels
Engels - avatar
+ 1
I highly appreciate your advices. Glad that i’ve done it right. Thanks, Brave Tea!
29th Feb 2020, 10:56 PM
Engels
Engels - avatar
0
You can use empty list to store the answer and then use (join)
2nd Mar 2020, 5:42 AM
Abdollahi Mohammed
Abdollahi Mohammed - avatar