I tried to add a condition to where if the while loop meets a "Y" or "y" it will still move the letters to the end, but keep "Y" or "y" at the beginning, yet the loop will end and just add "ay"
print("Pig Latin Translator Test!")
name = raw_input("What is your name, friend?")
if len(name) > 0 and name.isalpha():
print("Hello!")
else:
print("That's not a name!")
word = raw_input("What is your word?")
VOWELS = ("a", "e", "i", "o", "u", "A", "E", "I", "O", "U")
YList = ("Y", "y")
if word[0] in VOWELS:
word = word + "yay"
else:
This is the section causing problems:
while word[0] in YList or (not VOWELS):
word = word[1:] + word[0]
word = word + "ay"
print (word)
.upper()and.lower()functions?