Hello i have been learning Python 3 and its going in quite well.
But i have a query about classes.
i have the below code
Kind Regards
Rob
But i have a query about classes.
i have the below code
class Student(object): def __init__(self, name="Rob", grade='A', county="Essex"): self.name = name self.grade = grade self.county = county student1 = Student() print(student1.name)when i run in pycharm, i get the following error
Error: student1 = Student()
NameError: name 'Student' is not defined
can someone point out what im doing wrong please.Kind Regards
Rob