0

Pig latin challenge: wrong output

So I took on the Pig latin challenge. The idea is to write a code that puts the first letter of every word in a sentence at the end, and adds “ay”. Example: Can you drive? -> ancay ouyay riveday The problem is that with my code, the output prints each word on a new line, whereas I’d like for all words to be on the same line. Could you please help me? https://code.sololearn.com/cKJCeJ6BPwh7/?ref=app

21st Feb 2020, 3:45 PM
Martin Makariev
Martin Makariev - avatar
3 Respuestas
+ 2
Line 11: print(word[1:]+ "ay ", end="")
21st Feb 2020, 3:49 PM
Russ
Russ - avatar
+ 2
Russ Thanks a lot! It’s perfect!
21st Feb 2020, 4:00 PM
Martin Makariev
Martin Makariev - avatar
+ 2
Thank you, Alexandr !
21st Feb 2020, 4:02 PM
Martin Makariev
Martin Makariev - avatar