Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

These are the requirements but i need help fixing the code! It wont run the whole test after i return wtgrade This week's assignment involves

These are the requirements but i need help fixing the code! It wont run the whole test after i return wtgrade
image text in transcribed
image text in transcribed
This week's assignment involves writing a Python program to compute the weighted average grades for students and determine which student has the highest average., Write a function that uses student name as argument. The function should display the student name and prompt the user for three grades for the student: one for the discussion, one for the quiz, and one for the programming assignment. The function should calculate the weighted average grade using the following formula and return the calculated average. \[ \begin{array}{l} \text { wtAvgGrade }=\text { discussion_grade }{ }^{*} 0.15+\text { quiz_grade }{ }^{*} 0.35+\text { assignment_grade } * \\ 0.5 \end{array} \] Write a main program which defines a list of four students. You can decide on the names of the four students. Use a for loop, to call the function successively for each student to calculate weighted average grade for each student. In addition, a check should be made to determine whether that student's grade is the highest so far. Once the loop completes, the program should display the name of the student with the highest average grade, and the corresponding grade. If more than one student has the highest grade, display the name of the first such student. Your program should include Header comments (what the program does) and in-line comments (the major design steps). Document the values you chose for the student name list as well. Also document the values you chose as the weights for the three grades in your comments as well

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

More Books

Students also viewed these Databases questions

Question

Evaluate 3x - x for x = -2 Answer:

Answered: 1 week ago