Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please use python method for coding. Please try coding without respective files. Function Name: crimelndex Parameters: crimeData - a string containing the filename for a
Please use python method for coding. Please try coding without respective files.
Function Name: crimelndex Parameters: crimeData - a string containing the filename for a CSV file with the crime rates for certain cities crime Rate - a float containing the crime rate for Bikini Bottom Return Value: None Description: You might think Bikini Bottom isn't real, but it definitely is. And as many real cities do, it keeps track of crime within its borders, and it's time to brag. Write a program to take in a crime data spreadsheet (formatted in the same way as city_crime.csv) and Bikini Bottom's crime rate and prints out the number of human cities with a higher crime rate than Bikini Bottom. Just to flex on the humans. While you're at it, list out each city with higher crime than Bikini Bottom. Just to flex on the humans. Note: A higher number on the spreadsheet corresponds to a lower crime rate. Hint: Use two accumulators of different datatypes Test Cases: >>> crimeIndex ("city_crime.csv", 4444.4) Bikini Bottom has less crime than 6 cities. That includes New York. That includes San Jose. That includes San Diego. That includes Los Angeles. That includes Las Vegas. That includes Dallas. >>> crime Index ("city_crime.csv", 3000) Bikini Bottom has less crime than 3 cities. That includes New York. That includes San Jose. That includes San Diego.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