Computers and Technology

Use the function written in the last lesson to calculate a student’s GPA. Ask them how many classes they are taking, then ask them to enter the grades for each class and if it is weighted. Your program should then output the averaged GPA including the decimal place.

Your main program must call the function.

Sample Run
How many Classes are you taking? 7

Enter your Letter Grade: C
Is it weighted? (1 = yes) 1
Your GPA score is: 3

Enter your Letter Grade: D
Is it weighted? (1 = yes) 0
Your GPA score is: 1

Enter your Letter Grade: A
Is it weighted? (1 = yes) 1
Your GPA score is: 5

Enter your Letter Grade: B
Is it weighted? (1 = yes) 1
Your GPA score is: 4

Enter your Letter Grade: C
Is it weighted? (1 = yes) 0
Your GPA score is: 2

Enter your Letter Grade: A
Is it weighted? (1 = yes) 0
Your GPA score is: 4

Enter your Letter Grade: C
Is it weighted? (1 = yes) 0
Your GPA score is: 2

Your weighted GPA is a 3.0.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:30, melissalopez12
Write a function so that the main program below can be replaced by the simpler code that calls function original main program: miles_per_hour = float( minutes_traveled = float( hours_traveled = minutes_traveled / 60.0 miles_traveled = hours_traveled * miles_per_hour print('miles: %f' % miles_traveled) sample output with inputs: 70.0 100.0 miles: 116.666667
Answers: 3
image
Computers and Technology, 22.06.2019 12:00, Cocco
Which of the following does 3d animation create an illusion of on the screen? a. depth b. emotion c. length d. dialogue
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, jason9394
Facial expressions and gestures are examples of messages.
Answers: 3
image
Computers and Technology, 23.06.2019 13:00, alexacarillo
In excel - calculate the actual increase/decrease from first quarter to the second quarter then subtract subtract first quarter value from second quarter total then divide result by first quarter value
Answers: 1
Do you know the correct answer?
Use the function written in the last lesson to calculate a student’s GPA. Ask them how many classes...

Questions in other subjects: