Computers and Technology

7.4 code practice question 1 edhesive Instructions
Write a program that prompts the user to input a letter grade in either capital or lowercase. Your program should then output the correct number of the GPA. See the table below for possible inputs and expected outputs. Your program should define at least one function named GPAcalc that is called from your main program.

The GPAcalc function should take exactly one parameter—a string for the letter grade as lower or upper case. It will return either an integer for the GPA value or a string Invalid, if the letter grade parameter is invalid.

Input: Letter Grade Expected output: GPA value
A or a 4
B or b 3
C or c 2
D or d 1
F or f 0
Anything else Invalid
Sample Run 1
Enter your Letter Grade: a
Your GPA score is: 4
Sample Run 2
Enter your Letter Grade: A
Your GPA score is: 4
Sample Run 3
Enter your Letter Grade: C
Your GPA score is: 2
Sample Run 4
Enter your Letter Grade: G
Your GPA score is: Invalid

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:30, luje
Imagine that you have a friend who is starting a small business and is interested in using social media to spread the word. he is not certain that it is a good move, and has come to you for . would you advise him to use social media to advertise his business? why or why not? support you answer with information from the text.
Answers: 1
image
Computers and Technology, 22.06.2019 14:40, davidb1113
You begin your first day of responsibilities by examining the recent is security breach at gearup to get ideas for safeguards you will take. at gearup, criminals accessed the company's improperly-secured wireless system and stole customers' credit card information as well as employee social security numbers. what kind of computer crime did gearup face?
Answers: 3
image
Computers and Technology, 22.06.2019 18:30, lizz1228
Kto rozmawia z clamentain przez krĂłtkofalĂłwke w the walking dead w 4 epizodzie
Answers: 1
image
Computers and Technology, 22.06.2019 23:00, brookerebman15
Which type of tab stop is most for weights and measurements?
Answers: 1
Do you know the correct answer?
7.4 code practice question 1 edhesive Instructions
Write a program that prompts the user to i...

Questions in other subjects:

Konu
Mathematics, 28.10.2020 06:20
Konu
Mathematics, 28.10.2020 06:20