Grade Letters
scores has columns name and score (whole numbers). Turn each score into a letter: "A" for 90 or more, "B" for 80 to 89, "C" for 70 to 79, and "F" for anything lower. Return the list of letters in row order.
Example 1
scores {"name":["a","b","c","d"],"score":[95,85,70,12]}
returns ["A","B","C","F"]
A, B, C, F.
Constraints
- The tables are small
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More pandas problems
- Ids in Only One TableEasy
- InitialsEasy
- Invalid TweetsEasy
- Latest Row per PlayerEasy
- Longest TitleEasy
- Make SlugsEasy
- Median per GroupEasy
- Moving Sum of ThreeEasy