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, 21.06.2019 17:30
Who invented the tv .hint it was 2 people
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
What is the main benefit of minimizing the ribbon in word? more options will be accessible through customized keystrokes. more of the document will be viewable without needing to scroll. fewer controls will be accessible to the user by using the mouse. fewer editing options will be available without entering a password.
Answers: 1
question
Computers and Technology, 24.06.2019 00:30
Afiling system in which an intermediary source of reference, such as a file card, must be consulted to locate specific files is called a(n) system. a. shelf filing b. direct filing c. indirect filing d. shingling
Answers: 1
question
Computers and Technology, 24.06.2019 05:30
Cómo pongo un tomo de llamada sin pagar?
Answers: 1
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
Business, 22.08.2019 07:30
question
History, 22.08.2019 07:30
question
Biology, 22.08.2019 07:30
question
Chemistry, 22.08.2019 07:30
question
Computers and Technology, 22.08.2019 07:50
question
Social Studies, 22.08.2019 07:50
question
Geography, 22.08.2019 07:50
Questions on the website: 13722360