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.
https://ibb.co/PmH4HDv Thanks for your effort. Kind Regards.
1 answers ( 0 marked as helpful)
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
def __init__(self, name, age): ... Best, Eli