Popcorn Hack 1

Using this code and nested if statements, check if the user is a student by defining a variable and putting a user input. Modify the code and implement a feature that asks the user if they are a student. If yes is answered, allow a 20 percent discount off of the original 10 dollar ticket. If no is answered, keep the price the same. Make sure it is able to handle invalid responses such as responses other than “yes” or “no” by prompting the user to answer again with a simple “yes” or “no”

CHALLENGE: Add a feature that asks for the age of the user, and make varying ticket prices based off of the age groups.

  • Ages 0-12: Child Ticket (50% off)
  • Ages 13-63 Adult Ticket (0% off)
  • Ages 65+: Senior Ticket (30% off)

Popcorn Hack 2

  • Using this code, check if the number is even or odd, after satisfying the successful operation.