Code coach "Pig Latin", share your answers | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Code coach "Pig Latin", share your answers

Hi, this is my code for Code coach "Pig Latin": for i in input().split(): print(i[1:]+i[0]+"ay", end=" ") Share your versions, how did You do it? It will be usefull for me. Maybe on another languages, it will be interesting too

17th Dec 2021, 3:54 PM
Big_Dipper
2 Answers
+ 5
print(*((lambda w: w[1:]+w[0]+"ay") (word) for word in input().split()), end=" ") # Keep learning & happy coding :D
18th Dec 2021, 1:25 AM
SoloProg
SoloProg - avatar
+ 2
In C, #include <stdio.h> #include <string.h> int main() { char buf[256]; while (scanf("%s", buf) != EOF) printf("%s%cay ", buf+1, *buf); return 0; }
18th Dec 2021, 2:31 AM
Brian
Brian - avatar