Question: Task-1 Design a class Patient for the given code below. Write a class Patient Write the required constructor that takes 4 parameters and initialize the

Task-1 Design a class Patient for the given code below. Write a class Patient Write the required constructor that takes 4 parameters and initialize the instance variables accordingly. Write a method print_details that prints as shown in the output. For BMI, the formula is BMI = weight/ height2, where weight is in kg and height in meters. COPY THIS PORTION: #Write your code here #Do not change the following code: p1 = Patient("A", 55, 63.0, 158.0) p1.print_details) print) p2 = Patient("B", 53, 61.0, 149.0) p2.print_details() OUTPUT Name: A Age: 55 Weight: 63.0 kg Height: 158.0 cm BMI: 25.236340330075304 Name: B Age: 53
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
