+ 2

Jungle camping

Is something wrong ? sound= input() Lion= (sound.count("Grr"))*"Lion " Tiger= (sound.count("Rawr"))*"Tiger " Snake= (sound.count("Ssss"))*"Snake " Bird= (sound.count("Chirp"))*"Bird " print (Lion + Tiger + Snake + Bird ) Failed 1 test case

5th Apr 2020, 12:26 AM
Dolani Johnson Tobi
Dolani Johnson Tobi - avatar
2 Answers
+ 1
Assume input Snake Lion expect output is Ssss Grr but your code's output is Grr Ssss. You have to order your output depends on the input.
5th Apr 2020, 1:08 AM
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ - avatar