191k views
1 vote
Create a program that translates a letter grade to a numeric grade. A=4, B=3, C=2, D=1, F=0 The user may enter A+ or A- following the grade. "+" increases the numeric value by 0.3, while "-" decreases the numeric value of the grade by 0.3. (Note: There is no F+ or F-, however A+ has value of 4.0) Ask the user for a letter grade Enter a letter grade : Start by creating the logic to assign the correct numeric grade values to the grades (without having a + or a -) and test that the output value is as expected. (Note: Your program must accepts both upper case and lower case input !) DO NOT HARD CODE THE TEST CONDITIONS like "A+", "A-"….."D-", "F" , but rather use string operation and add the extra logic to address "+" or "-" behind a grade!! The output of the program shall be The numeric value is x.x where x.x is the result.

User JeffUK
by
6.3k points

1 Answer

5 votes
th8w 8s and a hope it hel0s
User Jonatan
by
5.7k points