Last answered:

22 Apr 2020

Posted on:

16 Apr 2020

0

classes and objects

Hello, I get an error when I tried same code in the lecture concerning assigning instances to a class. Images of the code and error are attached in the links below:- https://ibb.co/7NpYL85
https://ibb.co/PmH4HDv Thanks for your effort. Kind Regards.    
1 answers ( 0 marked as helpful)
Instructor
Posted on:

22 Apr 2020

0
Hi Hady,  thanks for reaching out! The problem seems due to the fact you've written 'Init' with a capitol 'I'. Try the following instead: class P(object):
    def __init__(self, name, age): ...   Best,  Eli

Submit an answer