This building has floors 1 to 12, and the lift has a keypad you can type on. Write pick_floor(text): if the text is a number from 1 to 12, return that int; if it isn't a number, or there is no such floor, return None. The floor check is already in the starter.
pick_floor("5")→5pick_floor("lobby")→Nonepick_floor("15")→Nonedef pick_floor(text):
floor = None
# your code here: try to turn text into an int in floor; on ValueError leave floor as None
if floor is None or floor < 1 or floor > 12:
return None
return floor
Run tries the examples. When they look right, Submit.