Word Up


#1

Why isn't this working correctly? It says "Oops, try again. It looks like first is "o" instead of "a"."

I don't see why this happens

pyg = 'ay'

original = raw_input('Enter a word:')

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

#2

step 1 of the instructions:

Create a new variable called word that holds the .lower()-case conversion of original.

you did this here:

word = original.lower()

so what does this line do:

word = "original"

step 2 of the instructions:

Create a new variable called first that holds word[0], the first letter of word

you created a new variable called first which holds the first letter of the string "original". first should hold the first letter of the string stored in the variable word


#3

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