Pop quiz! Don't know what went wrong!


#1

https://www.codecademy.com/courses/python-beginner-2W5v7/0/6?curriculum_id=4f89dab3d788890003000096#

The code will print the variable original either if the input is all in alphabets or not.

print 'Welcome to the Pig Latin Translator!'

# Start coding here!
original = raw_input('Enter a word:')
print original

if len(original)>0 and (original).isalpha() :
    print original
else:
    print 'empty'



#In the interpreter...

Welcome to the Pig Latin Translator!
Enter a word: rf4
rf4
empty
None

#2

Take out the first one and just leave the one inside the if statement.


#3

Yep it works now,thanks for the help!


#4

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