question 25 Operators & Expressions · medium
Store or compare?
A family plans a cinema trip: adults pay 15, children pay 8. The program should print the total and whether it is within the budget (spending exactly the budget is fine). It stops on the last line instead. Fix it.
Keepthe first three lines. Check runs your program again with other families and budgets
Prints
Total: 54, then Within budget: TrueExpected output2 lines
- 1Total: 54
- 2Within budget: True