Python Classes: Medical Insurance Project

Hello! I’m on the Python Classes: Medial Insurance Project located at: https://www.codecademy.com/paths/data-science/tracks/dscp-python-fundamentals/modules/dscp-python-classes/projects/ds-python-classes-project
and for some reason I can’t get anything to print to the terminal. I get no error message, nothing at all. I thought that if I continued, I’d eventually get something, but on the very last line for the print, I got an error message. When I try to play with the indents, I get errors.
Can someone look at my code and let me know what I’m doing wrong?

Code: Python-Codecademy/Insurance.py at main · HeliosDon/Python-Codecademy · GitHub

Thank you!

Line 14 has a ‘patient1’ that should be a ‘self’ and line 39 has a ‘patient1’ that doesn’t exist.

1 Like

Hi, thank you for pointing that out! I’ve edited the code and added in a line for patient1, but now I’m getting an error: ‘Patient’ object has no attribute ‘patient_profile’ for line 48, the print line. I was also getting indentation errors after adding in patient1 = Patient(“John Doe”, 25, 1, 22.2, 0, 0). I’m sorry but can you help me again please?

Lines 11 thru 18 should be down above line 47. They are currently inside the class definition.

Review your class and be sure all the defs are inline, and inside the definition.

Thank you so much for your help!!

1 Like