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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 12:30, mathhelper22
Can someone with my technology homework? ? i’m not very good with rulers. i need it asap though
Answers: 1
image
Computers and Technology, 23.06.2019 09:00, amberpublow7
Which best describes the role or restriction enzymes in the analysis of edna a. to break dna into fragments that vary in size so they can be sorted and analyzed b. to amplify small amounts of dna and generate large amounts of dna for analysis c. to purify samples of dna obtained from the environment so they can be analyzed d. to sort different sizes of dna fragments into a banding pattern that can be analyzed
Answers: 1
image
Computers and Technology, 24.06.2019 01:30, kellygaytan
Suppose a cpu with a write-through, write-allocate cache achieves a cpi of 2. what are the read and write bandwidths (measured by bytes per cycle) between ram and the cache? (assume each miss generates a request for one block.)
Answers: 1
image
Computers and Technology, 24.06.2019 03:30, laylay120
Other - a written response, no less than arial 12-point font, to the following: of the following, which would you consider is most important to customer service goals? choose one and explain why. (1) accuracy (2) punctuality and attendance (3) courtesy (4) productivity (5) organization
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 in other subjects:

Konu
Mathematics, 22.01.2020 21:31
Konu
World Languages, 22.01.2020 21:31