Question 3: If Else Elif

Write a Python program to find out if a child has collected enough seashells for their beach collection.

  1. Start by asking for the child’s name and store it in a variable called name.
  2. Ask how many small shells they have and store it in a variable called small_shells (as an integer).
  3. Ask how many medium shells they have and store it in a variable called medium_shells (as an integer).
  4. Ask how many large shells they have and store it in a variable called large_shells (as an integer).
  5. Calculate the total number of shells by adding small_shells, medium_shells, and large_shells, and store it in a variable called total_shells.
  6. Use an if-else condition to check:
    • If the total number of shells is 25 or more, print:
      “Amazing, [name]! You have collected [total_shells] shells, enough for your beach collection!”
    • Otherwise, print:
      “Almost there, [name]! You have [total_shells] shells. Collect a few more for your beach collection!”
Write what you are looking for, and press enter to begin your search!