Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

needs to be in python! THANK YOU!!!!!! Declare a class named PatientData that co

ID: 3762348 • Letter: N

Question

needs to be in python! THANK YOU!!!!!!

Declare a class named PatientData that contains two data members named height_inches and weight_pounds. Sample output for the given program:

GIVEN:


'''Your solution goes here'''

lunaLovegood = PatientData()
print('Patient data (before):', end=' ')
print(lunaLovegood.height_inches, 'in,', end=' ')
print(lunaLovegood.weight_pounds, 'lbs')


lunaLovegood.height_inches = 63
lunaLovegood.weight_pounds = 115

print('Patient data (after):', end=' ')
print(lunaLovegood.height_inches, 'in,', end=' ')
print(lunaLovegood.weight_pounds, 'lbs')

Explanation / Answer

class PatientData:
   height_inches=0
   weight_pounds=0

lunaLovegood = PatientData()
print('Patient data (before):', end=' ')
print(lunaLovegood.height_inches, 'in,', end=' ')
print(lunaLovegood.weight_pounds, 'lbs')

lunaLovegood.height_inches = 63
lunaLovegood.weight_pounds = 115
print('Patient data (after):', end=' ')
print(lunaLovegood.height_inches, 'in,', end=' ')
print(lunaLovegood.weight_pounds, 'lbs')