0

My code fails at one case could someone help me

https://www.sololearn.com/coach/45?ref=app

9th Apr 2021, 8:08 PM
اسلام البغدادى
اسلام البغدادى - avatar
11 Answers
+ 1
اسلام البغدادى There is Bird not Birds And also no need to cast input() with string because input () by default returns string
9th Apr 2021, 8:15 PM
A͢J
A͢J - avatar
+ 4
w = (input()).split(" ") n = { "Ssss":"Snake", "Grr":"Lion", "Chirp":"Bird", "Rawr": "Tiger" } s = "" for i in w: s += n[i] + " " print(s)
9th Apr 2021, 8:43 PM
Apongpoh Gilbert
Apongpoh Gilbert - avatar
+ 2
اسلام البغدادى We can't see your code through that link.
9th Apr 2021, 8:09 PM
A͢J
A͢J - avatar
+ 2
10th Apr 2021, 7:42 PM
A͢J
A͢J - avatar
+ 1
voice=str(input()) print(voice.replace('Grr','Lion') .replace ('Ssss','Snake') .replace ('Rawr','Tiger') .replace('Chirp','Birds'))
9th Apr 2021, 8:11 PM
اسلام البغدادى
اسلام البغدادى - avatar
+ 1
Thank u
9th Apr 2021, 8:17 PM
اسلام البغدادى
اسلام البغدادى - avatar
0
This is complex way for me but it is good to see another way to solve. Thanks
9th Apr 2021, 9:35 PM
اسلام البغدادى
اسلام البغدادى - avatar
0
i think the example is about polymorphism and interfaces if am not mistaken
10th Apr 2021, 7:39 PM
عبد الرحمن
عبد الرحمن - avatar
0
you are right i didnt read it through
10th Apr 2021, 8:01 PM
عبد الرحمن
عبد الرحمن - avatar