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 03:00
Consider this data sequence: "3 11 5 5 5 2 4 6 6 7 3 -8". any value that is the same as the immediately preceding value is considered a consecutive duplicate. in this example, there are three such consecutive duplicates: the 2nd and 3rd 5s and the second 6. note that the last 3 is not a consecutive duplicate because it was preceded by a 7. write some code that uses a loop to read such a sequence of non-negative integers , terminated by a negative number. when the code finishes executing, the number of consecutive duplicates encountered is printed. in this case, 3 would be printed. assume the availability of a variable, stdin, that references a scanner object associated with standard input. that is, stdin = new scanner(system.in); is given.
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
I'm taking a class on how to make a movie, and it offers some apps that would be in the process. the thing is, i don't have any of those ha. if you have any tips on some apps i could use, that would be awesome. i don't have an iphone, so don't suggest any apps like imovie. i know that this is a weird question, but it would be super for me. : )
Answers: 2
question
Computers and Technology, 22.06.2019 20:00
What side length would you specify if you were required to create a regular hexagonal plate that was composed of 33 cm(squared) of sheet metal? dimension the side length to 0.1 cm
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
Which of the following is not a symptom of chronic fatigue syndrome
Answers: 2
You know the right answer?
Here is the answer to Edhesive 7.5 code practice def GPAcalc(grade, weight):

grades = {...
Questions
question
Biology, 26.10.2019 15:43
question
Mathematics, 26.10.2019 15:43
Questions on the website: 13722360