Referencing local variable before assignment

30 views Asked by At

I have a piece of code

for p in activities:
      activity_progress_average =sum([p.activity_progress_compute])
activity_progress_average = activity_progress_average/len(activities)

Brings an error

UnboundLocalError : local variable 'activity_progress_average' referenced before assignment 
0

There are 0 answers