+ 2

I can't pass one test case in this

You are camping alone out in the jungle and you hear some animals in the dark nearby. Based on the noise they make, determine which animals they are. Task: You are given the noises made by different animals that you can hear in the dark, evaluate each noise to determine which animal it belongs to. Lions say 'Grr', Tigers say 'Rawr', Snakes say 'Ssss', and Birds say 'Chirp'. Input Format: A string that represent the noises that you hear with a space between them. Output Format: A string that includes each animal that you hear with a space after each one. (animals can repeat) Sample Input: Rawr Chirp Ssss Sample Output: Tiger Bird Snake Here is my solution :- list=[] list= input().split(" ") for i in range(len(list)): if list[i]=="Grr": print("Lion",end=(" ")) elif list[i]=="Rawr": print("Tiger",end=(" ")) elif list[i]=="Ssss": print("Snake",end=(" ")) elif list[i]=="Chrip": print("Bird",end=(" "))

31st May 2022, 3:57 PM
Nikunj Navdiya
Nikunj Navdiya - avatar
5 odpowiedzi
+ 2
Ah, I see. It looks like you have a typo. You're trying to find "Chrip" instead of "Chirp".
31st May 2022, 4:13 PM
Justice
Justice - avatar
+ 2
Are you getting a particular error? And just for readability purposes, it's always better to directly link your codebit rather than typing it out.
31st May 2022, 4:07 PM
Justice
Justice - avatar
+ 2
It's okay! Happens to me all the time.
31st May 2022, 4:15 PM
Justice
Justice - avatar
+ 1
No all the case are passed expect one and it's hidden so i can't see it and thanks for your suggestion
31st May 2022, 4:11 PM
Nikunj Navdiya
Nikunj Navdiya - avatar
0
Ohh 😅😅 sorry
31st May 2022, 4:14 PM
Nikunj Navdiya
Nikunj Navdiya - avatar