Lets Loop!


Hello I'm a novice python learner I'm doing the Pyglatin course and was wondering how to loop back to the beginning of the code if Y was inputted, or quit if n was inputted. I would be very grateful if you could help!

My code currently looks like this:

import time
print ('Welcome to the Pig Latin Translator!')
original = input("Enter a word:")

if len(original) > 0:
print("Please enter a letter with 1 or above letters.")

input("Would you like to translate another word? Y/n")
if input == ("Y"):
(what should I put here?)

its running in Python IDLE so it has a few differances


have loop or function already been covered?


Don't think so. Don't worry, I've sorted it out. Thanks Google lol

Harry Ayres (T-AFR Year 09)


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.