Мой профиль
ACTIVITY 16 / 50

More than two choices

Try as many times as you need

Let’s understand

elif checks another condition if the earlier ones were false. Python chooses the first true branch and skips the rest. The order of the checks matters. else can handle everything remaining.

Listen to the explanation

Example

n = 5
if n < 2:
    print("A")
elif n < 7:
    print("B")
else:
    print("C")
YOUR MISSION

Read a seed count. Below 3: SMALL. From 3 to 5: MEDIUM. From 6: LARGE.

I need a hint

After checking < 3, the next check can simply be < 6.

How to find an error
  1. Read the last line of the error message.
  2. Find the indicated line. Check quotes, parentheses and indentation.
  3. Change one thing and run again.

main.py

4 spaces

Your draft stays in this browser.

Result

Python
Your program’s output will appear here. Click Run.