Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Well done!
You have completed (UPI) Chapter 6: Decision-Making in Python!
Instruction
Nested Decision
Nested Decision Statements
Suppose a programmer is writing a program that reads in a game ID and player count and prints whether the user has the right number of players for the game.
The programmer may start with:
if game == 1 and players < 2:
print("Not enough players")
if game == 1 and players > 4:
print("Too many players")
if game == 1 and (2 <= players <= 4):
...