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
mcount
sicount
bkcount
bxcount
qcount
for row in A:
if row "Manhattan":
B
elif row "Brooklyn":
C
elif row "Bronx":
D
elif row "Staten Island":
E
elif row "Queens":
F
else:
pass
printManhattan: strG
printBrooklyn: strH
printBronx: strI
printStaten Island: strJ
printQueens: strK
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
