Pyglatin


#1


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

Oops, try again. Did you create a variable called word?

in the console: File "python", line 9
print "original"
^
IndentationError: unexpected indent


create a variable word which has the value of original.lower()
and also create the variable first which holds the value of first character


Replace this line with your code. 
pyg = 'ay'

original = raw_input('Enter a word:')

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


#2

You made these strings which shouldn't be.

You should watch your indentation. That said, print original which is given at default should be sufficient.

I hope this helps! :wink:


#3

pyg = 'ay'

original = raw_input('Enter a word:')

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


#4

still now working~~~~how do i indent it? i have created the two variables instructed to :frowning:


#5

Naa...You've already applied .lower() method here:

All you need do is:

print original

just as it is.


#6

this is the error i get even after only printing original

File "python", line 8
print original
^
IndentationError: unexpected indent


#7

pyg = 'ay'

original = raw_input('Enter a word:')

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


#8

You indent to same line as word and first, which is a one tab space. This is it.

pyg = 'ay'

original = raw_input('Enter a word:')

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

#9

thank you very much for your help~ i have finally got to move to the next step


#10

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