Computers and Technology

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

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
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
image
Computers and Technology, 22.06.2019 11:30, kieraweems2034
Communication is the exchange of information. true false
Answers: 2
image
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
image
Computers and Technology, 22.06.2019 22:30, jacob7542
The qwerty keyboard is the most common layout of keys on a keyboard
Answers: 3
Do you know the correct answer?
Edhesive 7.5 code practice. The hint says "Hint: Make sure to use two functions to incorporate the...

Questions in other subjects: