Skip to main content
๐Ÿ“œ WAYPOINT LESSON

Checkpoint โ€” Control flow

โญ beginnerโณ 20 min read๐Ÿ“ Lesson 17 of 85

Guarded computation, classification, and accumulation in one sitting.

Checkpoint: the grade report

Task: implement two methods:

  1. static char Letter(int score) โ€” A for โ‰ฅ90, B โ‰ฅ80, C โ‰ฅ70, D โ‰ฅ60, F below; throw ArgumentException for scores outside 0โ€“100.
  2. static string Histogram(int[] scores) โ€” one line per letter A..F in that order: the letter, : , then one # per score in that bucket, then \n. Scores out of 0โ€“100 are ignored. Null/empty input yields ""... except the histogram always prints all five lines, so empty input prints the five letters with zero # each.