GoatCam is a service for goat weddings. Guests use a QR code to go to a website, then upload their photos. Write a Python program to compute the price for one event.
The price depends on:
- The number of guests
- Where there is an upgrade (none, silver, or gold)
- A promo code
Each guest costs $1.20.
The standard package (no upgrade) allows ten uploads per guest. The silver upgrade costs an extra $22, and allows 50 uploads per guest. The gold package costs an extra $35 and allows 500 uploads per guest.
There is one promo code, "goats in love" that gives a 10% discount.
Input:
- The number of guests
- The upgrade package if any
- The promo code if any
Assume all input is in lower case, and there are no input errors.
Output:
- The number of guests
- The upgrade package if any
- The maxiumum uploads per guest
- Whether the promo code was applied
- The price, rounded to at most two decimal places
Here's sample I/O
Sample 1
- Goat Cam
- ==== ===
- Guests: 100
- Upgrade (none, silver, gold): none
- Promo code:
- --------------
- Guests: 100
- Upgrade: none
- Maximum uploads per guest: 10
- Price: $ 120.0
Sample 2
- Goat Cam
- ==== ===
- Guests: 100
- Upgrade (none, silver, gold): silver
- Promo code:
- --------------
- Guests: 100
- Upgrade: silver
- Maximum uploads per guest: 50
- Price: $ 142.0
Sample 3
- Goat Cam
- ==== ===
- Guests: 120
- Upgrade (none, silver, gold): gold
- Promo code: goats in love
- --------------
- Guests: 120
- Upgrade: gold
- Maximum uploads per guest: 500
- Promo code applied
- Price: $ 161.1
Be sure to format the output correctly, including the blank lines, the underlining, and the exact labels (e.g., 'Guests: '). make sure the price has at most two decimal places.
Use the IPO pattern. Include a comment identifying each section of the code.
Upload you solution here, not to Moodle. The usual standards apply.