<jupyter_start><jupyter_text>CodingBat - Code Practice **Warmup-1-> Sleep_in** 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. Return True if we sleep in.  **Test Data:**                                                                                                                  *sleep_in(False, False) → True* *sleep_in(True, False) → False*  *sleep_in(False, True) → True*<jupyter_code>def sleep_in(weekday, vacation):
  if (not weekday and vacation):
    return True
  elif (weekday and not vacation):
    return False
  elif (not weekday and not vacation):
    return True
  else:
    return True    
sleep_in(False,False)
sleep_in(True,False)
sleep_in(False,True)
sleep_in(True,True)<jupyter_output><empty_output><jupyter_text>**Warmup-1 > monkey_trouble**We have two monkeys, a and b, and the parameters a_smile and b_smile indicate if each is smiling. We are in trouble if they are both smiling or if neither of them is smiling. Return True if we are in trouble.**Test data:***monkey_trouble(True, True) → True**monkey_trouble(False, False) → True**monkey_trouble(True, False) → False*<jupyter_code>def monkey_trouble(a_smile, b_smile):
  if (a_smile and b_smile) or (not a_smile and not b_smile):
    return True
  else:
    return False    
monkey_trouble(True, True)
monkey_trouble(False, False)
monkey_trouble(True, False)
monkey_trouble(False, True)<jupyter_output><empty_output><jupyter_text>**Warmup-1 > sum_double**Given two int values, return their sum. Unless the two values are the same, then return double their sum.sum_double(1, 2) → 3sum_double(3, 2) → 5sum_double(2, 2) → 8<jupyter_code>def sum_double(a, b):
    # Store the sum in a local variable
    sum = a + b
    # Double it if a and b are the same
    if a == b:
        sum = sum * 2
    return sum
sum_double(1,2)
sum_double(3, 2)
sum_double(2, 2)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09494949494949495, 'fraction_numerical': 0.009595959595959595, 'mean_word_length': 3.5228310502283104, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '390217', 'license': 'MIT', 'n_tokens_mistral': 665, 'n_tokens_neox': 646, 'n_words': 228, 'path': 'CodingBat-Python.ipynb', 'repo_name': 'ppant/CodingBat', 'size': '1980'}