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.
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
Unlock full course notes by signing up
Measure the effect of an outdated docstring
A rental kiosk charges for every started minute. Its implementation follows that policy, but its docstring has not been updated. All durations supplied are nonnegative integers in seconds.
For a session lasting 194 s, by how many minutes does the actual return value exceed the result described by the docstring? Answer in minutes as an exact integer.
Document changes visible to the caller
A notification function receives an ordinary Python list of strings named tags and a string named tag. The current docstring omits details that callers need. Which statements accurately describe the shown function? Select all that apply.
Arrange a source file for predictable navigation
A team uses source-file organization, the arrangement of a file's sections, to help readers locate information. Arrange the Python blocks from top to bottom according to the team's documented layout:
The file description is the first statement, so Python recognizes it as the module's docstring.
Imports come before configuration constants.
Separate requirements from enforced checks
A delivery service accepts packages weighing 1–2000 g inclusive. Assume every supplied weight is an integer. A reviewer compares the function’s docstring with its implementation, including calls outside the permitted range. Which finding correctly identifies a documentation discrepancy?