Question

A course syllabus states that there are three grading elements: hw, mid, and final. The weights...

A course syllabus states that there are three grading elements: hw, mid, and final. The weights of these elements in the final grade are: hw 25%, mid 25%, and final 50%. So the formula to calculate one’s final grade is: Score of hw (out of 100) x 0.25+ Score of mid (out of 100) x 0.25+ Score of final (out of 100) x 0.50. Your scored 90/100 in hw, 95/100 in mid, and 87/100 in final. Please write a Python program to compute your final grade.

  1. Assign variable hw to be 90, variable mid to be 95, variable final to be 87.
  2. Compute your final grade using the formula described above and save it in a variable finalgrade.
  3. Print finalgrade.

Requirements:

  1. Use a text editor to edit your Python code.

Homework Answers

Answer #1

Python code:

#initializing hw as 90
hw=90
#initializing mid as 90
mid=95
#initializing final as 90
final=87
#finding finalgrade
finalgrade=hw*0.25+mid*0.25+final*0.5
#printing the finalgrade
print("finalgrade =",finalgrade)

Screenshot:


Output:

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT