I have a small txt file with fields Block, Plot, Species, and DBH. I need to create a script with a class having those properties. Within the class I need to include a method that calculates "DIB = DBH * (1/1.09)". DBH is the diameter 4.5 feet from the ground. Once I am completely done I need to run a script that imports the class and prints the results in this format:
Output:Report 1
Block:
Plot:
Species:
DBH:
DIB:
Report 2
etc.
There are a total of 9 objects. So far I am working the class but not sure I got it correct. I got no errors but I also didn't get any returns. Here is where I am. By the way I am the beginner of beginners so please don't laugh. If you do please help once you stop. class Tree: def __init__(self,Block,Plot,Species,DHB): self.Block = Block self.Plot = Plot self.Species = Species self.DHB = DHB def assessment(self): if self.DHB == 4.5: rate = (1/1.09) assessment = self.DHB * rate return assessment