Python Object-Oriented Python Instant Objects Your first class

Manuel Canario
Manuel Canario
1,458 Points

What I'm I doing wrong the program still tells me that it can not find Student() As if it was a new variable I created

objectoriented-python-2/instant-objects/your-first-cla

class Student: name = "Manuel" me = Student() Print(me.name)

first_class.py
class Student:
    name = "Manuel"
me = Student()
Print(me.name)

1 Answer

Steven Parker
Steven Parker
203,995 Points

The error message is bizarre! But the actual issue is that Python language is case-sensitive, and most keywords are all lower-case.

So instead of "Print" (with a capital "P"), it should be "print" (lower case).