Skip to content

2019-2: Making the Grade

Score RangeLetter Grade
0–64F
65–69D
70–79C
80–89B
90–100A

Write a function that, given an array of integer test scores in the inclusive range 0–100, returns an identically-shaped array of the corresponding letter grades according to the table to the left.

💡 Hint: You may want to investigate the interval index function X⍸Y.

Examples:

      (your_function) 0 64 65 69 70 79 80 89 90 100
FFDDCCBBAA

      (your_function) ⍬  ⍝ returns an empty vector


      (your_function) 2 3⍴71 82 81 82 84 59
CBB
BBF
your_function ←

Solutions

Video Thumbnail YouTube

Chat transcript Code on GitHub