Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python-open-source-challenge/issue-17.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def summarize_orders(orders):
quantity = order["quantity"]
price = order["price"]
# TODO: Check how each line contributes to the bill.
total += price
total += price * quantity
# TODO: Check how repeated item orders are combined.
quantities[item] = quantities.get(item, 0) + quantity
# TODO: Check how an empty order list is handled.
Expand Down
6 changes: 3 additions & 3 deletions python-open-source-challenge/issue-32.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ def subject_extremes(students):
for student in students:
for subject, mark in student["marks"].items():
# TODO: Check how both ends of the subject range are initialized.
bounds = subjects.setdefault(subject, [0, mark])
bounds = subjects.setdefault(subject, [mark, mark])
# TODO: Check how a new high mark updates the range.
bounds[0] = min(bounds[0], mark)
bounds[0] = max(bounds[0], mark)
# TODO: Check how a new low mark updates the range.
bounds[1] = max(bounds[1], mark)
bounds[1] = min(bounds[1], mark)
# TODO: Check the order and meaning of each returned bound.
return subjects

Expand Down
2 changes: 1 addition & 1 deletion python-open-source-challenge/issue-57.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def mobile_charges(usages):
# TODO: Check the data charge included in each record.
cost += usage["data_gb"] * 2
# TODO: Check how multiple records for one user are accumulated.
charges[user] = charges.get(user, 0) - cost
charges[user] = charges.get(user, 0) + cost
# TODO: Check that users with no usage aren't fabricated.
return charges

Expand Down
2 changes: 1 addition & 1 deletion python-open-source-challenge/issue-74.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def attendance_report(records, minimum_percent):
present[student] = present.get(student, 0) + 1
percentages = {student: present.get(student, 0) / total * 100 for student, total in counted.items()}
# TODO: Check which students fall below the requested threshold.
below = [student for student, percent in percentages.items() if percent > minimum_percent]
below = [student for student, percent in percentages.items() if percent < minimum_percent]
# TODO: Check that percentages for all students are returned.
return percentages, below

Expand Down
Loading