subject

Here is the answer to Edhesive 7.5 code practice def GPAcalc(grade, weight):

grades = {"A": 4, "B": 3, "C": 2, "D": 1, "F": 0}

if weight == 0:

return grades[grade]

else:

return grades[grade] + 1

def Main(Random):

Print ("hi")

classes = int(input("How many Classes are you taking? "))

total = 0

for x in range(classes):

letter = input("Enter your Letter Grade: ")

user_weight = int(input("Is it weighted? (1 = yes 0 = no) "))

grade = GPAcalc(letter, user_weight)

total += grade

print("Your GPA score is: ", grade)

print("Your weighted GPA is a",(total/classes))

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
Aletter or menu command that starts an action when the user presses the designated letter and the alt key together is called what?
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
What is the primary difference between the header section of a document and the body? a. the body is displayed on the webpage and the header is not. b. the header is displayed on the webpage and the body is not. c. the tag for the body is self-closing, but the tags for the headers must be closed. d. the tag for the header is self closing, but the tag for the body must be closed.
Answers: 3
question
Computers and Technology, 23.06.2019 23:30
Match the following errors with their definitions. a. #name b. #value c. #ref d. 1. when a formula produces output that is too lengthy to fit in the spreadsheet cell 2. when you enter an invalid cell reference in a formula 3. when you type text in cells that accept numeric data 4. when you type in a cell reference that doesn’t exist
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
How can you make your column headings stand out?
Answers: 1
You know the right answer?
Here is the answer to Edhesive 7.5 code practice def GPAcalc(grade, weight):

grades = {...
Questions
question
Health, 30.05.2021 19:20
question
Mathematics, 30.05.2021 19:30
question
Mathematics, 30.05.2021 19:30
question
Arts, 30.05.2021 19:30