Codington
0 of 6 problems solved • 0%

Exercise prompt

Price a Workshop

An expression can refer to an earlier assignment. For example, minutes = lessons * 45 recalculates the total whenever the lesson count changes.

Example

rows = 3 seats_in_row = 8 seats = rows * seats_in_row print(seats - 2) # 22 seats left after two reservations

Naming the product makes it available for a second calculation. Changing rows changes both results.

Your task

A workshop sells tickets at one price and pays a single room fee. Use the three supplied variables to calculate the ticket income in income and the money left after the fee in balance.