Skip to content

Instantly share code, notes, and snippets.

@jjlumagbas
Last active October 9, 2018 17:40
Show Gist options
  • Save jjlumagbas/fab53b1f498355b229cf216a2101b197 to your computer and use it in GitHub Desktop.
Save jjlumagbas/fab53b1f498355b229cf216a2101b197 to your computer and use it in GitHub Desktop.

Starter function definitions for 1380 Reading quiz 5

Refer to Racket docs for the specification of <=

Grading goes like this:

Percentage Final grade
90-100% A
80-89% B
70-79% C
60-69% D
0-59% F
(define (letter-grade num-grade)
(cond
[(<= 90 num-grade 100) "A"]
[(...) "B"]
[(...) "C"]
[(...) "D"]
[else "F"]))
(define (letter-grade-2 num-grade)
(cond
[(...) "F"]
[(...) "D"]
[(...) "C"]
[(...) "B"]
[else "A"]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment