Question: I need to create a function that satisfies the criteria below. I can only use. append(), .remove(), .get(), .items(), int, open, close, readlines, range, and

I need to create a function that satisfies the criteria below. I can only use. append(), .remove(), .get(), .items(), int, open, close, readlines, range, and len. I'm in python 3.6 The database is the same format as below.

Functions creating/updating ranked databases These functions start from a database that either has incomplete rankings, or with incorrect rankings. They w need to create correct rankings for the rsulting database rank_names by year_gender (db, year, gender) : This function accepts an existing (unranked) database db, a year and a gender. It calculates the ranking of names according to their counts and updates that information into the database. Rank male and female names separately. The most popular name for each gender (with the highest count) gets a rank value of I Assign all tied-count names with the same rank and make sure the next rank is adjusted accordingly Given counts of A:18, 8:5, C:s, D:5, E:1, they'd get rankings of A , 8 2, C2, D-2, E-s This function updates the database in-place and returns None. rank names (db) : This function accepts an existing database and ranks all names for all years of data present, making the database become ranked . This function should return None Rank male and female names separately Hint: use previous functions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
