Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started