Write a program that translates a letter grade into a number grade. Letter grades are A,...

80.2K

Verified Solution

Question

Programming

  1. Write a program that translates a letter grade into a numbergrade. Letter grades are A, B, C, D, and F, possibly followed by +or -. Their numeric values are 4, 3, 2, 1 and 0. There is no F+ orF-. A “+” increases the numeric value by 0.3, a “–“ decreases it by0.3. However, an A+ has value 4.0.4 pts

Enter a Letter grade: B-

The numeric value is 2.7

  1. Your code with comments
  2. A screenshot of the execution

Test Cases:

           B-   (should print 2.7)

           A+ (should print 4.0)

           B+ (should print 3.3)

           C    (should print 2.0)

           F+ (should print 0.0)

           G    (should print “no such grade”)

Python, keep it simple

Answer & Explanation Solved by verified expert
4.5 Ratings (605 Votes)
HiHope you are doing fine I have coded the above question inpython Since you have mentioned to keep it simpke I have tried tomake it as easy as possible The logic of the code is prettystraighforward and the code is explained through comments that    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students