Have codes exactly like what the teacher shows but can't make it work
I wrote the codes exactly like what was shown to us in the video. However there is an error in the console after running the code "steve = Patient...". See below:
steve = Patient('Steven Hughes', 48)
TypeError: Patient() takes no arguments
Thank you for your question!
If you have copied the code exactly as it is in the video, then you should have no problem running it. Make sure that you have defined your
__init__ function properly, namely:
def __init__(self, name, age): ...