0 of 6 problems solved • 0%

Exercise prompt

Choose a Signal

An if statement runs its indented lines when the condition is true. Its else block handles the remaining inputs.

Example

def layer(rainy): if rainy: return "raincoat" else: return "jumper" print(layer(False)) # jumper

With rainy set to False, the body after else supplies the result.

Your task

Complete the body of signal(door_open). An open door must return "wait". A closed door must return "go". Keep the supplied function header.