Question: Read in the tree inventory file, created in Lab 3 W , and show a count of the number of times a specific species of

Read in the tree inventory file, created in Lab 3W, and show a count of the number of times a specific species of tree occurs in the file. Once you unscramble the program, display the number of oak trees. Unscramble the code below so the output is "there are 3 oak trees":
from BrowserFile import open
import csv
for y in r:
k =0
with open("treeinventory.csv","r", newline=") as f:
for t in y:
tree = input("enter tree type to get a count")
k = k +1
if t == tree:
print("there are",k,tree,'trees')
r = csv.reader(f)

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!