Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedPlease use python method for coding. Please try coding without respective files. image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

More Books

Students also viewed these Databases questions

Question

3. How frequently do the assessments occur?

Answered: 1 week ago