Skip to content

Commit

Permalink
Update for_loop_test_scores_example.py
Browse files Browse the repository at this point in the history
- Changed True/False values to "Yes"/"No", to make output more reader-friendly
- Used f-string for string interpolation
  • Loading branch information
dphoenix authored Feb 6, 2025
1 parent b393891 commit 1c08fe0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python-break/for_loop_test_scores_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

num_failed_scores = 0
failed_score = 60
needs_tutoring = False
needs_tutoring = "No"
for score in scores:
if score < failed_score:
num_failed_scores += 1
if num_failed_scores >= 2:
needs_tutoring = True
needs_tutoring = "Yes"
break

print("Does the student need tutoring? " + str(needs_tutoring))
print(f"Does the student need tutoring? {needs_tutoring}")

0 comments on commit 1c08fe0

Please sign in to comment.