Kotlinlearncs.online LogoJava
Return to List

Solve: A Generous Curve

Created By: Geoffrey Challen
/ Version: 2020.8.0

Assume that three Int variables have been declared and initialized: yourScore, extraCredit, and topGradeThreshold. Write a conditional expression that prints:

  • "A+" if yourScore is greater than topGradeThreshold, otherwise
  • "A" if yourScore plus extraCredit is greater than topGradeThreshold, otherwise
  • "A-"

Don't modify yourScore, extraCredit, or topGradeThreshold.

(Our curve is not this generous, but students do do very well in this class. So will you!)

Related Lessons

Stuck? You may find these lessons helpful:

Report a Problem

Attribution must link to this page: https://www.learncs.online/solve/kotlin/a-generous-curve/[email protected]