My code fails at one case could someone help me | Sololearn: Learn to code for FREE!

-1

My code fails at one case could someone help me

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

4/9/2021 8:08:21 PM

اسلام البغدادى

9 Answers

New Answer

+1

اسلام البغدادى There is Bird not Birds And also no need to cast input() with string because input () by default returns string

+4

w = (input()).split(" ") n = { "Ssss":"Snake", "Grr":"Lion", "Chirp":"Bird", "Rawr": "Tiger" } s = "" for i in w: s += n[i] + " " print(s)

+3

اسلام البغدادى We can't see your code through that link.

+3

عبد الرحمن No it's not

+1

voice=str(input()) print(voice.replace('Grr','Lion') .replace ('Ssss','Snake') .replace ('Rawr','Tiger') .replace('Chirp','Birds'))

+1

0

This is complex way for me but it is good to see another way to solve. Thanks

0

i think the example is about polymorphism and interfaces if am not mistaken

0

you are right i didnt read it through