I am at the pop quiz which said:
Take some time to test your current code. Try some inputs that should
pass and some that should fail. Enter some strings that contain
non-alphabetical characters and an empty string.
So I wanted to check (and tell the user) if they typed only characters or only numbers. Or both or none.
I found from here https://docs.python.org/3/tutorial/controlflow.html#if-statements that you should just use elif to make different conditions (as in check the input).
but when I put in the first elif and run it, I get a this message: Oops, try again.
Oops! Did you accidentally delete the variable named original?
What am I doing wrong? and how else can I do this?
print 'Welcome to the Pig Latin Translator!' # Start coding here! original = raw_input("Enter a word:"'') if len(original) > 0 or original.isalpha() > 0: print original elif: len(original) < 0 and original.isalpha() > 0: print "you typed 0 letters and these numbers: ",original else: print "empty"