[CreativeProgramming]Lecture3_Selection in Python (cont.)
[CreativeProgramming]Lecture3_Selection in Python (cont.)
Spring 2025
CUL1122 Lecture #03
Lab 3
Today
3
Exercise #1: Movie Ticket Pricing
❖Create a script that determines the ticket price based on the person’s
age.
▪ The script takes an age as input and outputs the corresponding ticket price.
▪ Price categories:
➢Children (0-12): $5
➢Teens (13-17): $7
➢Adults (18-64): $10
➢Seniors (65+): $6
4
Exercise #2: Snack Vending Machine
❖Create a script where the user selects a snack, and the program displays
its price.
▪ The script takes a snack name as input and outputs the corresponding price.
▪ Snack Prices:
➢Pretzels: $4
➢Chips: $2
➢Soda: $1.5
➢Candy: $1
5
Exercise #3: Music Playlist Recommendation
6
Exercise #4: Restaurant Tip Calculator
7
Exercise #5: Weather Outfit Suggestion
8
수고하셨습니다!