40 lines
901 B
Markdown
40 lines
901 B
Markdown
---
|
|
id: practical-python-1.10
|
|
source_exercise_id: "1.10"
|
|
title: "Making a table"
|
|
section: "1.3 Numbers"
|
|
source_path: "01_Introduction/03_Numbers.md"
|
|
source_repo: "https://github.com/dabeaz-course/practical-python"
|
|
source_commit: "93dca856b41c61a0a0f85ae334116e4c125629ea"
|
|
student_visible_solution: false
|
|
has_private_solution: true
|
|
skip: false
|
|
---
|
|
|
|
# Exercise 1.10: Making a table
|
|
|
|
> Source: Practical Python Programming, `01_Introduction/03_Numbers.md`.
|
|
|
|
### Exercise 1.10: Making a table
|
|
|
|
Modify the program to print out a table showing the month, total paid so far, and the remaining principal.
|
|
The output should look something like this:
|
|
|
|
```bash
|
|
1 2684.11 499399.22
|
|
2 5368.22 498795.94
|
|
3 8052.33 498190.15
|
|
4 10736.44 497581.83
|
|
5 13420.55 496970.98
|
|
...
|
|
308 874705.88 3478.83
|
|
309 877389.99 809.21
|
|
310 880074.1 -1871.53
|
|
Total paid 880074.1
|
|
Months 310
|
|
```
|
|
|
|
## 关联来源
|
|
|
|
- [[summaries/03_Numbers]]
|