Python Run an object oriented python program that will guess for a person’s age based on their height, weight and number of siblings. The inputs should be enclosed in a text file (information.txt), while the guessed age will be put into another text file (output.txt). The age of the person must be in 1 decimal place. Formula for Age: (Weight in kg /height in feet)*no.of siblings Use the following template (two files) for guidance: main.py from person import Person # Input # Insert your code here that will read the inputs from “information.txt # Process # Insert your code below that will compute for the “age” as guessed from the three inputs. The formula is given for this # Make use of the “Person” class by creating an instance of this. The object will help you retrieve the information of the person. # Output # Insert your code that will create an "output.txt" that contains the hypothesized age.
Python
Run an object oriented python program that will guess for a person’s age based on their height, weight and number of siblings. The inputs should be enclosed in a text file (information.txt), while the guessed age will be put into another text file (output.txt). The age of the person must be in 1 decimal place.
Formula for Age: (Weight in kg /height in feet)*no.of siblings
Use the following template (two files) for guidance:
main.py
from person import Person
# Input
# Insert your code here that will read the inputs from “information.txt
# Process
# Insert your code below that will compute for the “age” as guessed from the three inputs. The formula is given for this
# Make use of the “Person” class by creating an instance of this. The object will help you retrieve the information of the person.
# Output
# Insert your code that will create an "output.txt" that contains the hypothesized age.
person.py
class Person:
def __init__(self, name):
self.name = name
def get_weight():
# Insert code on how to compute for the weight in kg given weight in lbs.
Example
—— information.txt ———
person,weightlbs,heightfeet,siblings
marshall,200,6.5,3
robin,140,5.8,1
lily,120,5.3,3
—— output.txt ——
41.9
10.9
30.8
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)