Python Forum

Full Version: new learner
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi all
I am new learner in python. I could not find my error root cause , can you help me :

mood = 'tired'
if mood == 'tired':
  hit_snooze_button = True
  print('rezi is tired so hits the snooze button')
  elif mood == 'well':
    getout_of_bed = True
    print('rezi is well rested and she is already out of bed')
File "<ipython-input-34-05d3cd1bbc5a>", line 5
elif mood == 'well':
^
SyntaxError: invalid syntax
mood = 'tired'
if mood == 'tired':
    hit_snooze_button = True
    print('rezi is tired so hits the snooze button')
elif mood == 'well':
    getout_of_bed = True
    print('rezi is well rested and she is already out of bed')