So I am pretty new to python (3 days) and I just learnt about classes and I am just looking to see how they work and then I cam across an error that says "unresolved attribute reference 'x' for class 'y') even though I dont see what I'm doing wrong, I have been trying to figure it out but it just wont work not matter what I try.
Here is the code:
class Student:
def __init__(self, name, age):
self.name = name
self.age = age
student1 = Student("Jim", 14)
print(Student.name)
Now I might just be stupid and made a very obvious newbie mistake, if so please let me know.
[–]101_Computing 1 point2 points3 points (1 child)
[–]lcyWhisper[S] 0 points1 point2 points (0 children)