Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Summarize Lewin's three-step change model? LO.1

Answered: 1 week ago