0
My code fails at one case could someone help me
11 odpowiedzi
+ 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)
+ 2
اسلام البغدادى
We can't see your code through that link.
+ 2
عبد الرحمن
No it's not
+ 1
voice=str(input())
print(voice.replace('Grr','Lion')
.replace ('Ssss','Snake')
.replace ('Rawr','Tiger')
.replace('Chirp','Birds'))
+ 1
Thank u
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