Skip to content

Latest commit

 

History

History
30 lines (18 loc) · 718 Bytes

File metadata and controls

30 lines (18 loc) · 718 Bytes

Lab 3: Grading

Let's convert a number grade to a letter grade, using if and elif statements and comparisons.

Concepts Covered

  • input, print
  • type conversion (str to int)
  • comparisons (< <= > >=)
  • if, elif, else

Instructions

  1. Have the user enter a number representing the grade (0-100)
  2. Convert the number grade to a letter grade

Numeric Ranges

  • 90-100: A
  • 80-89: B
  • 70-79: C
  • 60-69: D
  • 0-59: F

Version 2 (Optional)

Find the specific letter grade (A+, B-, etc). You can check for more specific ranges using if statements, or use modulus % to get the ones-digit to set another string to '+', '-', or ' '. Then you can concatenate that string with your grade string.