Question: Write a program that reads a letter grade from the user and displays corresponding number grade. Use a function letter2GPA() to implement the 1ogic. The

 Write a program that reads a letter grade from the user

Write a program that reads a letter grade from the user and displays corresponding number grade. Use a function letter2GPA() to implement the 1ogic. The function letter2GPA() takes as input a letter grade (A, B, C, D, F, possibly with a - or +) and returns the corresponding number grade. The numeric values for A, B, C, D, and F are 4, 3, 2, 1, 0. A sign increases the number grade value by 0.3 and a - decreases it by 0.3. Use a dictionary rather than using if... elif structure. A+ = 4.00 A = 4.00 A- = 3.67 B+ = 3.33 B = 3.00 B- = 2.67 C+ = 2.33 C = 2.00 C- = 1.67 D+ = 1.33 D = 1.00 D- = 0.67 F = 0.00 Expected output Enter the letter grade: A+ Your number grade is 4.0 Enter the letter grade: B+ Your number grade is 3.3 Enter the letter grade: D Your number grade is 1.0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!