Grinder Corp.'s HR team wants your help filtering job applications for data analyst positions. They no longer fully trust university grades, since AI cheating is so easy. So, they ask applicants to write programs for basic data analysis tasks. They run the programs through an AI checker, that gives a score from 1 (not done by AI) to 10 (definitely AI). They also work out applicants' GPA on math, statistics, and programming courses.
They give you a CSV file with the data (download it). Here's part of it:
- "Name","GPA","AI detection score"
- "Roderick",3.4,3
- "Junie",3.4,6
- "Bea",3.2,5
- "Rodney",3.1,6
- "Weldon",3.5,5
- "Del",3.2,3
- "Charissa",6.8,9
The fields and validation rules are:
- Name should not be MT (empty), or consist of just whitespace characters.
- GPA should be a float from 0 to 4.
- AI detection score should be an integer from 1 to 10.
Write a program that goes through the data, filters out invalid records, lists applicants the company will consider, and shows some summary counts. Here's what the output should be:
- AI suspect cleaner
- == ======= =======
- Applicants for further review:
- Weldon
- Gail
- Margy
- Anneliese
- Nubia
- Delmar
- Valery
- Lecia
- Ashanti
- Cassy
- Chastity
- Bo
- Counts (I love to count, ah, ah, ah!)
- Records: 50
- Valid records: 44
- Suspicious applications: 32
- Accepted applications: 12
- Fraction accepted (%): 27.3
- All hail King Snorlax!
The company will consider applicants who have a GPA of at least 3.5 and an AI score of no more than 5.
Make sure you have at least three functions. Add correctly formatted docstrings to each one. Check the textbook so you know what "correctly formatted" means.
Make sure your output's format matches the above, including the blank lines. Round the accepted fraction to one decimal place. You can replace Snorlax with your fave Pokemon, if you want, though Snorlax is clearly the best. Seriously, what's up with that potato one?
As usual, upload a zip of your solution, with code and data file, to this site. Do not upload to Moodle.
The usual coding standards apply.