0

I want to define a function called sleep_in(weekday, vacation). The parameter weekday is True if it is a weekday, and the parameter vacation is True if we are on vacation. We sleep in if it is not a weekday or we're on vacation.

sleep_in(False, False) → True  
sleep_in(True, False) → False  
sleep_in(False, True) → True  
sleep_in(True, True) → True  

here's the function I defined

 def sleep_in(weekday, vacation):
   match (weekday, vacation):
    case (False, False):
     return True
    case (True, False):
     return False
    case (False, True):
     return True
    case (True, True):
     return True  

but I get the following error:

invalid syntax (line 2)  

can anyone tell me what's wrong with my code?
Edit:
Here's my full code in Jupiter Notebook!
Block of Code

1 Answers1

0

You have not followed the writing rules. You should leave a space the size of a tab.

def ...():
        match(...):
                case(...):
...