Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In python language, write the following. High school assignment - please keep simple I nstructions Write a program that prompts the user to input a

In python language, write the following. High school assignment - please keep simple

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 parametera 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions