Respuesta :
The semester grade in this class can be calculated after implementing the following python program using rangs, input and loops.
What is the python program?
CODE in Python:
# declearing maximum score to 975
max_score = 975
score = 0
# Taking input from user
for i in range(1,11):
while True:
num = int(input("What is your grade for Vocarem assignments 1-{}? ".format(i*5)))
if(num >=0 and num <= i*5):
break
else:
continue
score += num
for i in range(1,11):
while True:
num = int(input("What is your grade for quiz {}? ".format(i)))
if(num >=0 and num <= 20):
break
else:
continue
score +=num
for i in range(1,11):
while True:
num = int(input("What is your grade for hand trace {}? ".format(i)))
if(num >=0 and num <= 10):
break
else:
continue
score +=num
for i in range(1,11):
while True:
num = int(input("What is your grade for mini-project {}? ".format(i)))
if(num >=0 and num <= 20):
break
else:
continue
score +=num
while True:
num = int(input("What was your score on the final? "))
if(num >=0 and num <= 200):
break
else:
continue
score +=num
print("\n")
grade = ""
# calculating percentage
percentage = (score/max_score)*100
# calculating grade with the help of percentage
if percentage>= 93 and percentage <= 100:
grade = "A!"
elif percentage>= 89 and percentage < 93:
grade = "A-!"
elif percentage>= 87 and percentage < 89:
grade = "B+"
elif percentage>= 83 and percentage < 87:
grade = "B"
elif percentage>= 79 and percentage < 83:
grade = "B-"
elif percentage>= 77 and percentage < 79:
grade = "C+"
elif percentage>= 73 and percentage < 77:
grade = "C"
elif percentage>= 69 and percentage < 73:
grade = "C-"
elif percentage>= 67 and percentage < 69:
grade = "D+"
elif percentage>= 60 and percentage < 67:
grade = "D"
else:
grade = "E"
# printing results
print("CALCULATING YOUR SEMESTER GRADE...")
print("Total points earned: {}".format(score))
print("Total possible points: {}".format(max_score))
print("Percent grade: {}".format(round(percentage,2)))
print("You earned a(n) {}".format(grade))
To know more about python program refer:
https://brainly.com/question/28691290
#SPJ4