Counter variable for class
- by George
I am having problem getting this piece of code to run. The class is Student which has a IdCounter, and it is where the problem seems to be. (at line 8)
class Student:
def __init__(self):
# Each student get their own student ID
idCounter = 0
self.gpa = 0
self.record = {}
# Each time I create a new…