+ 1
Jungle camping
It’s supposed to replace the sounds with animals, but it doesn’t do anything. word=input() while 'Rawr' in word: word.replace('Rawr','Tiger') while 'Chirp' in word: word.replace('Chirp','Bird') while 'Ssss' in word: word.replace('Ssss','Snake') while 'Grr' in word: word.replace('Grr','Lion') print(word)
2 Antworten
+ 1
I solved this challenge in a different way.
I use a for loop and append animals to a list that I turned into a string.
https://code.sololearn.com/cQdPgZm0aiYc/?ref=app
+ 2
I would say replace while with if but I didn't testet it.
Edit:
Ah I just saw that you forget to set your world variable every time.
word = word.replace...