Question: Let's turn to the borough column. Let's count the number of film permits issued by each of the five boroughs in the city of New

Let's turn to the borough column. Let's count the number of film permits issued by each of the five boroughs in the city of New York.
Professor Hammett gives you some code to do this but it's incomplete. Loop through the 'Borough' column and count the permits by borough. Use context clues about the borough to match the correct count variable with the line in the if statement and print statements that it should go.
m_count =0
si_count =0
bk_count =0
bx_count =0
q_count =0
for row in [A]:
if( row == "Manhattan"):
[B]+=1
elif( row == "Brooklyn"):
[C]+=1
elif (row == "Bronx"):
[D]+=1
elif (row == "Staten Island"):
[E]+=1
elif (row == "Queens"):
[F]+=1
else:
pass
print("Manhattan: "+ str([G]))
print("Brooklyn: "+ str([H]))
print("Bronx: "+ str([I]))
print("Staten Island: "+ str([J]))
print("Queens: "+ str([K]))
Response Feedback:
Look at the count varaibles declared before the for loop. Use context clues on which should be incremented and printed in each line.

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!