Wrong code in Day 54

Problem description

When copying and running the sample code as shown in the attached file, it shows an error.

Expected behavior

running properly

Actual behavior

error message pops up

Steps to reproduce

just check out day54’s material

Browser

Arc

OS

Mac OS

Device if mobile

N/A

Plan

free trier

Please upload screenshots

Hi @a0081353 , welcome to the forums!
What is the error message that shows up?

2 Likes

You can see that from the AI debug on the right, total isn’t defined.

2 Likes

Does adding total = 0 below the reader = line work?
If not, try adding it just below the import csv statement.

2 Likes

Thanks! Now it works well. Actually I just wanted to point out what’s wrong with the sample code for future-learner.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.