Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
new learner
#1
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
Reply
#2
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')
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with kivy for a learner Talbot9 2 1,313 Mar-21-2022, 07:47 AM
Last Post: Talbot9
  New Python learner looking for key word guidance naga 2 1,774 Nov-20-2019, 01:09 PM
Last Post: ChislaineWijdeven
  New python learner tony1812 1 2,528 Jul-25-2017, 05:25 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020