Question: need fixed.. import math class ticket: _ _ ticketType: str _ _ baseCost: float _ _ discountAmount: float _ _ geniePlusCharges: float _ _ totalTicketCost:
need fixed..
import math
class ticket:
ticketType: str
baseCost: float
discountAmount: float
geniePlusCharges: float
totalTicketCost: float
def initself tix, basecst:
self.ticketType tix
self.baseCost basecst
self.calcdiscount
self.calcgeniepluscharges
self.calctotalticketcost
def calcdiscountself:
YesNo inputIs guest under ten years old or a veteran of the US Armed Forces?yn:
if YesNolower y:
self.discountAmount basecst
else:
self.discountAmount
def calcgeniepluschargesself:
YesNo inputWould you like to add Genis Plus to your ticket for $:
if YesNolower y:
self.geniePlusCharges
else:
self.geniePlusCharges
def calctotalticketcostself:
self.totalTicketCost self.baseCost self.discountAmount self.geniePlusCharges
def printticketself:
printfselfticketType:selfbaseCost:fself.discountAmount:fselfgeniepluscharges:fselftotalTicketCost:f
@property
def ticketTypeself:
return self.ticketType
@property
def baseCostself:
return self.baseCost
@property
def discountAmountself:
return self.discountAmount
@property
def geniePlusChargesself:
return self.geniePlusCharges
@property
def totalTicketCostself:
return self.totalTicketCost
tickets
def main:
another y
while another.lowery:
printWelcome to Disnyland!"
printPlease select your ticket type:"
printDay Single Park Ticket: $
printDay Hopper Ticket: $
printDay Single Park per Day Ticket: $
printDay Hopper Ticket: $
selection intinputYour selection
if selection :
tix Day Single Park Ticket"
basecst
elif selection :
tix Day Hopper Ticket"
basecst
elif selection :
tix Day Single Park Ticket"
basecst
elif selection :
tix Day Hopper Ticket"
basecst
tickets.appendtickettix basecst
another inputAdd another ticket to your order? yn:
print
YOUR ORDER:
print::::formatBASE COST", "DISCOUNT", "GENIE "TOTAL COST"
print
grandTotal
for o in tickets:
oprintticket
grandTotal grandTotal ototalCost
printf
Your order total: $grandTotal:f
print
Enjoy your stay at Disneyland, the happiest palce on earth!"
if namemain:
main
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
