Python Run an object-oriented python program that will guess for a…
Question Answered step-by-step Python Run an object-oriented python program that will guess for a… 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.pyfrom 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 give an “output.txt” that contains the hypothesized age. person.pyclass Person: def __init__(self, n): self.name = n def get_weight(): # Insert code on how to compute for the weight in kg given weight in lbs. Example—— information.txt ———person,weightlbs,heightfeet,siblingsmarshall,200,6.5,3robin,140,5.8,1lily,120,5.3,3 —— output.txt ——41.910.930.8 Computer Science Engineering & Technology Python Programming COMP 1730 Share QuestionEmailCopy link Comments (0)


