Checkpoint 3.1.10. A Python program, including another.
Compute the total amount of money loaned and store it in the variable
loan_total
.<program>
is not interactive, by default, no matter where it is hosted.<listing>
since we will want to reference it shortly. The program does not do very much, it just defines four variables whose values are lists of statistics. It should run, and there will be no syntax errors, but it is a bit boring since there is no output.<program>
recycled from before.@include
attribute on the including program whose value is the @xml:id
of the included program. So by running the next program, it should pass all of its three tests (for example another example using unit tests, see Checkpoint 3.3.4). Now reload the page, do not run the program in the listing, and then see that the program in the exercise still runs correctly.loan_total
.print()
statement.loan_total
.@language
set to sql
uses the @database
to load a SQLite database file.test
database table.