8. Word Up | HELP!


I really don't get what I'm supposed to do.



You need to convert the original variable to a lowercase word variable like it says in the directions.

word = original.lower()


Ok I'm digging myself a hole here. I'm missing the point of creating a variable called word[0]

pyg = 'ay'
word = original.lower()
original = raw_input('Enter a word:')
first = 'word[0]'
if len(original) > 0 and original.isalpha():
print original
print 'empty'

Please check my code and syntax


First and foremost, I'm gonna ask you, that from next time onwards please follow this guide: (https://discuss.codecademy.com/t/how-do-i-format-code-in-my-posts/51139/2)
to post your code in a proper format. This is so that people who are willing to help you out can see your code properly.

Ok.. Now to your code:

1)Your code is totally out of order.

2)You've got this .. word = original.lower().. before you set the variable original. Does this make sense?

3)Variable first should not be set to a string, instead it should be set to something like this.. first = word[0]. word[0] takes the first letter of the input. This will start making more sense further in the course.

I've tried to point out all your mistakes, I'm going to leave the order up to you.

Happy Coding :slight_smile:


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