subject

I’m failing this class and i’m stuck on this one, this is the code from the last lesson: def GPAcalc(grade, weighted):
grade = grade. lower()
dictionary = {"a":4, "b":3, "c":2, "d":1, "f":0}
if weighted == 1 and grade in dictionary:
return "Your GPA score is: " + str(dictionary[grade] + 1)
elif weighted == 0 and grade in dictionary:
return "Your GPA score is: " + str(dictionary[grade])
else:
return"Invalid"

print(GPAcalc(input("Enter your Letter Grade: "), int(input("Is it weighted? (1 = yes, 0 = no) ")


I’m failing this class and i’m stuck on this one, this is the code from the last lesson:

def GPAc

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
The editing of digital photos us about the same level of difficulty as editing an analog photo
Answers: 2
question
Computers and Technology, 22.06.2019 13:30
In which phase does software coding and testing happen in the spiral model? the spiral model does not have a separate testing phase. both, software coding and testing occurs during the phase.
Answers: 3
question
Computers and Technology, 23.06.2019 00:30
Write the html code to make a link out of the text “all about puppies”. it should link to a pdf called “puppies.pdf” inside the “documents” folder. the pdf should open in a new window.
Answers: 2
question
Computers and Technology, 24.06.2019 10:00
Which feature of a blog to restore and retrieve older post
Answers: 3
You know the right answer?
I’m failing this class and i’m stuck on this one, this is the code from the last lesson: def GPAcal...
Questions
question
History, 19.04.2020 09:19
question
Mathematics, 19.04.2020 09:38
question
Mathematics, 19.04.2020 09:38
question
Mathematics, 19.04.2020 09:38
question
Mathematics, 19.04.2020 09:39
question
History, 19.04.2020 09:39
Questions on the website: 13722360