Skip to content

Commit cff2fe2

Browse files
committed
TR updates
1 parent 14fe1a5 commit cff2fe2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

python-string-formatting/format-method.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
number_template = "The number is {}"
2+
sum_template = "{0} plus {1} is {2}"
3+
24
print(number_template.format(42))
35

46
a = 5
57
b = 10
6-
sum_template = "{0} plus {1} is {2}"
78
print(sum_template.format(a, b, a + b))
89

910
debit = 300.00

python-string-formatting/grades_report_v2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
SUBJECT_TEMPLATE = "{name:<15} Grade: {grade:3} Comment: {comment}"
22
REPORT_TEMPLATE = """
3-
"Progress Report. Student: {name}"
4-
"Average: {average:.2f} / 100"
3+
Progress Report. Student: {name}
4+
Average: {average:.2f} / 100
55
66
Course Details:
77
{subjects_report}

0 commit comments

Comments
 (0)