5. Check Yourself ... Some More


#1



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


Oops! Did you accidentally delete the variable named original?


syntax error


print 'Welcome to the Pig Latin Translator!'

# Start coding here!
raw_input("Enter a word:")
original = raw_input ('Prompt')
if len(original) > 0:
    print True
else:
    print "empty"
    if has_chars(the_string) and the_string.isalpha():
    print False
else:
    print "empty"


#2

You are overthinking this... try using this as a template:

print 'Welcome to the Pig Latin Translator!'

userGeneratedString = raw_input("A Prompt")
if len(userGeneratedString) > 0 and userGeneratedString.isalpha():
    print userGeneratedString
else:
    print "string"

#3

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