Sometimes an if statement does not allow for enough possible outcomes. Look at the example below.

<aside> 💡 Aisha wants to input today’s weather forecast into a program she is writing. She wants the program to give a comment based on the temperature.

if the temperature is less than 0, the program should output → “it may be safer to stay in” if the temperature is between 0 and 5 → “It will be freezing today” if the temperature is between 6 and 10 → “It will be quite chilly today” if between 11 and 18 → “it will be a mild day” if between 18 and 25 → “The temperature will be very hot today, remember sunscreen!” and for all other temperatures output → “It will be scorchio!

</aside>

You’ll be writing the program for the above scenario in just a moment. Take a look at the example syntax below for a similar solution.

goals = int(input("How many did arsenal score last night?"))

if goals == 0:
  print("Arsenlol always make me laugh 😂")
elif goals >=1 or goals <=2:
  print("its nice to see they score a few")
elif goals >2 or goals <5:
  print("It sounds like it may have been an exciting game")
else:
  print("Wow! Arsenal must have thrashed the other team")

Key points from the above example:

Another example

A popular game we’ve all probably played to help make a decision such as what you’re watching on TV has been Rock-Paper-Scissors. In this example, you will see 2 things that are new to you.

https://replit.com/@bitFez/eliftask2-rock-paper-scissors#main.py

https://youtube.com/shorts/jgFurizupMI?si=VROYJxTgfvVsJBfu

Tasks