https://www.sololearn.com/coach/45?ref=app i think this is ok but cases faild. Why? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

https://www.sololearn.com/coach/45?ref=app i think this is ok but cases faild. Why?

7th Oct 2020, 4:14 PM
Atalay Osmanoğlu
Atalay Osmanoğlu - avatar
4 Answers
+ 2
The Code Coach states that the input format will be "A string that represent the noises that you hear with a space between them." The sample input shows that multiple noises in the input are possible. You are only checking for one. You'll need to split the input by space, loop through all noises, and output the animal for each iteration.
7th Oct 2020, 4:28 PM
MaddieL
MaddieL - avatar
+ 1
Atalay Osmanoğlu you need to put your code in the Code Playground and share a link. We cannot see your code in the Code Coach link you have provided.
7th Oct 2020, 4:17 PM
MaddieL
MaddieL - avatar
+ 1
hear = input() a = hear x = 'Ssss' y = 'Rawr' z = 'Chirp' t = 'Grr Grr' if x == a: print ("Snake") elif y == a: print ("Tiger") elif z == a: print ("Bird") elif t == a: print ("Lion Lion")
7th Oct 2020, 4:18 PM
Atalay Osmanoğlu
Atalay Osmanoğlu - avatar
7th Oct 2020, 4:19 PM
Atalay Osmanoğlu
Atalay Osmanoğlu - avatar