23rd Feb 2020, 8:23 AM
Rajkamal Ingle
11 Answers
+ 3
Well, your approach is interesting to say the least, but, you overcomplicated it. I will give you a hint: use the replace() method in python.
23rd Feb 2020, 10:03 AM
Fernando Pozzetti
Fernando Pozzetti - avatar
+ 2
Rajkamal Ingle No. Just read the description again. There is no hint about the number of animals.
23rd Feb 2020, 9:53 AM
Denise Roßberg
Denise Roßberg - avatar
+ 2
Rajkamal Ingle And here is a hint that animals can repeat: "Output: A string that includes each animal that you hear with a space after each one. (animals can repeat)"
23rd Feb 2020, 9:54 AM
Denise Roßberg
Denise Roßberg - avatar
+ 1
Fernando Pozzetti Mukesh I have added my code, have a look.
23rd Feb 2020, 9:45 AM
Rajkamal Ingle
+ 1
You should make your code work for more than 4 sounds. You’ll have to rewrite the code totally cuz you cant make it work in this way.
23rd Feb 2020, 9:56 AM
QWKKK
QWKKK - avatar
+ 1
Fernando Pozzetti It worked, thnx!
23rd Feb 2020, 10:08 AM
Rajkamal Ingle
0
Check that the outputs are correct. Caps lock and all. Show us your code
23rd Feb 2020, 8:23 AM
Fernando Pozzetti
Fernando Pozzetti - avatar
0
Rajkamal Ingle Your code does not work for more than 4 sounds.
23rd Feb 2020, 9:33 AM
Denise Roßberg
Denise Roßberg - avatar
0
Denise Roßberg The problem asked for output of Four sounds only.
23rd Feb 2020, 9:44 AM
Rajkamal Ingle