8/11


#1

I can't seem to figure out this piece of code.

pyg = 'ay'

original = raw_input('Meow')

if len(original) > 0 and original.isalpha():
print original
word = lower(original)
first = word[0]
else:
print 'empty'


#2

See changes below...

pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
    word = original.lower()                  # note changes
    first = word[0]
    print original
else:
    print 'empty'

#3

This code is not yet complete


#4

That is intentional. The idea is to get over one hump at a time, and cement the correct code in mind in the process. The OP has not returned so one may suspect they have gotten over this hurdle and moved on. Posting all the code is not helpful, and is actually discouraged here.


#5

you have to create the variable outside the if statement

pyg = 'ay'

original = raw_input('Enter a word:')
word = original.lower()
first = word[0]

if len(original) > 0 and original.isalpha():

print original
print first
print word

else:
print "empty"