Computers and Technology, 05.02.2021 22:50, valdiviaricky1355
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))
Answers: 2
Computers and Technology, 22.06.2019 11:00, najerajulio
What is the foundation for proper monitoring, load balancing and routing in distributed systems
Answers: 3
Computers and Technology, 22.06.2019 11:30, kieraweems2034
Communication is the exchange of information. true false
Answers: 2
Computers and Technology, 22.06.2019 18:00, ladyree8721
Which of the following physical laws can make the flow of water seem more realistic? a. motion b. gravity c. fluid dynamics d. thermodynamics
Answers: 2
Edhesive 7.5 code practice.
The hint says "Hint: Make sure to use two functions to incorporate the...