Skip to content

Commit a5d6327

Browse files
committed
Fix high scores challenge solution
1 parent e278a7e commit a5d6327

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ch12-file-input-and-output/7-challenge-create-a-high-scores-list.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
# Change the path below to match the location on your computer
88
scores_csv_path = (
9-
Path.home() /
10-
"github/realpython" /
11-
"python-basics-exercises" /
12-
"ch11-file-input-and-output" /
13-
"practice_files" /
9+
Path.home()
10+
/ "github/realpython"
11+
/ "python-basics-exercises"
12+
/ "ch12-file-input-and-output"
13+
/ "practice_files"
1414
"scores.csv"
1515
)
1616

@@ -21,7 +21,7 @@
2121
high_scores = {}
2222
for item in scores:
2323
name = item["name"]
24-
score = item["score"]
24+
score = int(item["score"])
2525
# If the name has not been added to the high_score dictionary, then
2626
# create a new key with the name and set its value to the score
2727
if name not in high_scores:

0 commit comments

Comments
 (0)