I just started to learn programming and one of my tasks was to create a pig Latin translator in python
Heres my code:
def pyglatin():
words = input("Enter a word please:").split()
for word in words:
print(word[1:] + word[0] +"ay", end = " ")
if word[0] == "a" or "i" or "u" or "e" or "o":
print(word[0] + word[1:] + "way", end = " ")
pyglatin()
My problem is that the result keeps printing both words:
Enter a word please:hello
ellohay helloway
Also, how can I make the users input all lowercase?
Thanks :)