Create a new variable with if statement



I am stuck on section 8 of pygLatin Part 2 p any suggestion on how create a new variable within an if statement?


Just put code that creates new variable in body of if :slightly_smiling: Example:

if not 18 % 2:
    result = "18 is odd!"


Thanks for the input but for some reason its still not working


Please post your code :slightly_smiling:


pyg = 'ay'

original = raw_input('Enter a word:')


"word" = orginal.lower()

first = "word"[0]:

print original

print 'empty'

I have to create a variable called word that is the lowercase of original and create a variable called first


"word" is a string, value. word is a name of the object.

So to create object called word you should use this syntax:

word = orginal.lower()

And it's original, not orginal.

Whole code:

pyg = 'ay'

original = raw_input('Enter a word:')

if "you need to add a condition here":
    word = original.lower()
    first = word[0]
    print original
    print 'empty'


Thanks for the help and explanation!


You're very welcome :slightly_smiling: