Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Compose a function called write_converted_csv that takes four parameters. The first is the name of a file to write.

I need help with this question on my study guide and how to code it in python.

Compose a function called write_converted_csv that takes four parameters. The first is the name of a file to write. The second is a list of strings (the names of mammals). The third is a list of floats (weights of mammals in kilograms). The fourth is a list of floats (brain weights of mammals in grams.)

i.) The function writes a new .csv file (with the given filename) in the same format as the original "BrainBodyWeightKilos.csv" using the values in the three lists, but all kilogram values and all gram values should first be converted to pounds, and names should be in title case. Your conversion factor for converting from kilograms should be 2.205; from grams it should be 0.0022.

ii.) The floats written to the file should be rounded to 2 decimal places

BrainBodyWeightKilos: http://mste.illinois.edu/malcz/DATA/BIOLOGY/Animals.html (Instructions say to open the file with a text editor rather than excel.)

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question