subject

Edhesive 7.5 code practice. The hint says "Hint: Make sure to use two functions to incorporate the last lesson and the current one—the GPAcalc() function and a new one."
So there needs to be two def functions for there to be a pass.
Im providing my code from the last lesson if you want to use it as a starter and just edit it:
def GPAcalc(g, w):

if g == "a" or g == "A":
return 4 + w
elif g == "B" or g == "b":
return 3 + w
elif g == "C" or g == "c":
return 2 + w
elif g == "D" or g == "d":
return 1 + w
elif g == "F" or g == "f":
return 0 + w
else:
return "Invalid"

#MAIN
grade = input("Enter your Letter Grade: ")
weight = int(input("Is it weighted? (1 = yes, 0 = no)"))
gpa = GPAcalc(grade, weight)
print("Your GPA score is: " + str(gpa))


Edhesive 7.5 code practice.

The hint says Hint: Make sure to use two functions to incorporate th

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:00, bombbomb2157
Eva has many contacts on the professional networking site she uses which contacts are considered second degree
Answers: 3
image
Computers and Technology, 22.06.2019 17:00, juandguardado7045
Your company has 1,500 desktop computers running windows 7. you want to upgrade them to windows 10. which type of microsoft license would be best suited in this situation?
Answers: 3
image
Computers and Technology, 22.06.2019 20:30, fickllyd000
In this lab, you complete a prewritten c program that calculates an employee’s productivity bonus and prints the employee’s name and bonus. bonuses are calculated based on an employee’s productivity score as shown below. a productivity score is calculated by first dividing an employee’s transactions dollar value by the number of transactions and then dividing the result by the number of shifts worked.
Answers: 3
image
Computers and Technology, 23.06.2019 11:30, kieante01
The most accurate readings that you can take on an analog vom are when the meter's pointer is at the a. center scale. b. extreme right. c. near right. d. extreme left.
Answers: 1
You know the right answer?
Edhesive 7.5 code practice. The hint says "Hint: Make sure to use two functions to incorporate the...

Questions in other subjects:

Konu
Spanish, 01.12.2020 01:00
Konu
Medicine, 01.12.2020 01:00