Complete the code to check if it is raining and you need an umbrella.
if is_raining [1]: print("Take an umbrella.")
We check if is_raining is True to decide if we need an umbrella.
Complete the code to decide if you should carry a jacket based on temperature.
if temperature [1] 20: print("Carry a jacket.")
If the temperature is less than 20 degrees, it's cold, so carry a jacket.
Fix the error in the code to decide if you should take a break based on tiredness.
if tiredness [1] 7: print("Take a break.")
The correct operator to check if tiredness is greater than or equal to 7 is '>='.
Fill both blanks to create a decision that checks if you should go outside based on weather and time.
if weather [1] "sunny" and time [2] 18: print("Go outside.")
You go outside if the weather is exactly 'sunny' and the time is before 18 (6 PM).
Fill all three blanks to create a dictionary comprehension that maps tasks to their priority if priority is above 3.
high_priority_tasks = [1]: [2] for [3] in tasks.items() if [2] > 3
The dictionary comprehension uses task as key, priority as value, and iterates over tasks.items().