Question: Write a program that reads all students in the studentgrades.csv file, prints out their name, their percentage (rounded to one decimal place), and their letter
Write a program that reads all students in the "studentgrades.csv" file, prints out their name, their percentage (rounded to one decimal place), and their letter grade. Create a def called letter that takes two arguments (score and possible) and returns an "a" for 90% and up, a "b" for 80% to 90%, a "c" for 70% to 80%, a "d" for 60% to 70%, and an "f" otherwise. Use this def to display the third column.
**CODE HAS TO INCLUDE THE FOLLOWING**
1 or more:import open from BrowserFile module
1 or more:import from the csv module
1 or more:file name as specified
1 or more: define the function 'letter' as described
1 or more: use division inside the function 'letter'
1 or more: use if inside the function 'letter'
1 or more: open file for csv reading in a with
1: make a csv reader object
1:call round to format the output
1: call letter to get the letter grade
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
