Stuck - Obviously Newbie


It says my code looks a bit off. Check the Hint for help. This is what I see from the box on the top right for the Pig Latin thing:

Welcome to the Pig Latin Translator!
Prompt the_string
Prompt the_string
Traceback (most recent call last):
File "python", line 7, in
NameError: name 'has_chars' is not defined

I don't know how to define has_chars

Replace this line with your code. 
print 'Welcome to the Pig Latin Translator!'

# Start coding here!
variable_name = raw_input('Prompt')
original = raw_input('Prompt')

if has_chars(the_string) and the_string.isalpha():
    print the_string
    print "empty"


original is your variable name? You only need on prompt

to determine if the string has characters, check if the length (len()) is greater then (>) zero (0)

original is your string? so check if original is alpha


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