subject

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

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:10
Ihave a music player on my phone. i can buy songs, add them to playlists and play them. obviously it would be redundant to store each song in each playlist; each playlist is just a list of pointers to the songs. for this lab you will simulate this behavior. your program will need to have options to: add songs to the system library (you will store the text of the first line of the song, rather than the audio) add playlists add songs to a playlist list playlists play a playlist list all of the songs in the library with a count of how many times each song has been played remove a song from a playlist remove a playlist remove a song from the library (and thus from all playlists that contain it) note that we will not be checking many error cases. in real programming this would be bad, you should usually try to recognize and respond to as many types of errors as you can. in the context of class we are trying to acquaint you with as many concepts as possible, so for the sake of educational efficiency we will not be checking most errors in this lab, you may assume that your user provides correct input. you may add all appropriate error testing if you wish, but we will not be testing for it.
Answers: 2
question
Computers and Technology, 22.06.2019 15:30
Why would a programmer use the logical operator and in an if statement? a: when an action is to be taken that requires both conditions to be falseb: when an action is to be taken that requires both conditions to be truec: when an action is to be taken that requires the first condition to be falsed: when an action is to be taken that requires the second condition to be truei took the test and the answer is b.
Answers: 3
question
Computers and Technology, 23.06.2019 03:30
Ihave a singular monitor that is a tv for my computer. recently, i took apart my computer and put it back together. when i put in the hdmi cord and booted the computer to see if it worked, the computer turned on fine but the screen was blue with "hdmi no signal." i've tried everything that doesn't require buying spare parts, any answer is appreciated!
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Which of the following tasks is an audio technician most likely to perform while working on a nature documentary? (select all that apply). eliminating potentially distracting background noise adding sound effects making sure the lighting is adequate for a particular scene changing the narration to better match the mood of the documentary
Answers: 3
You know the right answer?
7.4 code practice question 1 edhesive Instructions
Write a program that prompts the user to i...
Questions