Track units through a readable booking calculation

A booking program uses a unit-bearing identifier, a name that includes the measurement unit, for each monetary amount. Read the Python code and complete the table with the exact values stored after execution. Enter integers for amounts in cents and an exact decimal for the amount in dollars. The service fee applies once per booking.


Python
TICKET_PRICE_CENTS = 1250
SERVICE_FEE_CENTS = 175
CENTS_PER_DOLLAR = 100

ticket_count = 4
subtotal_cents = ticket_count * TICKET_PRICE_CENTS

# Add one service fee for the entire booking.
total_cents = subtotal_cents + SERVICE_FEE_CENTS
total_dollars = total_cents / CENTS_PER_DOLLAR
IdentifierUnitStored value
subtotal_centscents
total_centscents
total_dollarsdollars

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Program Readability, Organization, and Documentation Questions: