Question: in python please Define a class named person which should have the following methods: - Its constructor should take four actual parameters: name, weight in

in python please in python please Define a class named person which should have the

Define a class named person which should have the following methods: - Its constructor should take four actual parameters: name, weight in pounds, height in feet, and the remaining height in inches. (Note: One foot has 12 inches.) - A method giveName which returns the name of the person. - A method BMI which returns the body mass index of the person rounded to 1 place of decimal. For weight in pounds and height in inches, BML is calculated as BMI=(weight/height2)703 Following is a sample usage of the dass Thd the corresponilini outnot Sample Usage: p1=person("Mary",132,5,6)p2=person("John",140,5,2) print(p1.giveName(),"has BMI".p1.BM10) print(p2. giveName0."has BMI"p2.BMI0) Corresponding output: Mary has BMI 21.3 John has BMI25.6

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!