Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Name: Navpreet Banwait Class: XXXXXXXXXX Date: 11/20/2022 File Name: Program to compute student grades Prof. Stephen Grady # This program used to compute the weighted average grade for each...

1 answer below »
Name: Navpreet Banwait
Class: XXXXXXXXXX
Date: 11/20/2022
File Name: Program to compute student grades
Prof. Stephen Grady
# This program used to compute the weighted average grade for each student in a group of four students.
# It will ask the user for three grades, one for discussion, one for quiz, one for programming assignment.
# It will give the output to user for average grades for each student and Name of the Student with highest grades in numbers.
Design
Main
Welcome message
#Display Welcome message
#List of names ["Kelsey", "Laura", "Sandy", "Tiffany"]
#Prompt the user for discussion grade
#Prompt the user for assignment grade
#Prompt the user for quiz grade
#highest = -1
#student with highest grade = ""
Calculate Grades
# percentage weight to each grade
· discussion_weight = .15
· assignment_weight = .25
· quiz_weight = .60
#average = (0.15 x discussion XXXXXXXXXXx assignment XXXXXXXXXXx quiz)
Output
#Name of Student with highest grade
#Highest grade
END
Test Plan
    Test Plan #
    Input (No. of Grades)
    Expected Output
    Actual Output
    Pass/Fail
    1
    Kelsey grades
Please enter discussion grade: 60
Please enter Assignment grade: 80
Please enter Quiz grade: 50
Laura grades
Please enter discussion grade: 60
Please enter Assignment grade: 80
Please enter Quiz grade: 90
Sandy grades
Please enter discussion grade: 75
Please enter Programming Assignment grade: 88
Please enter Quiz grade: 80
Tiffany grades
Please enter discussion grade: 69
Please enter Programming Assignment grade: 87
Please enter Quiz grade: 90
    Kelsey average grade: 59.00
Laura average grade: 81.90
Sandy average grade: 81.25
Tiffany average grade: 86.10
Name of Student with highest grade: Tiffany
Highest grade: 86.10
    Kelsey average grade: 59.00
Laura average grade: 81.90
Sandy average grade: 81.25
Tiffany average grade: 86.10
Name of Student with highest grade: Tiffany
Highest grade: 86.10
    PASS
    2
    Kelsey grades
Please enter discussion grade: -15
    
**Invalid input**
    **Invalid input** grade should be a positive number between 0 and 100
    FAIL
    3
    Kelsey grades
Please enter discussion grade: xyz
    **Invalid input**
    **Invalid input** grade should be a numbe
    FAIL
    4
    Kelsey grades
Please enter discussion grade: 70
Please enter Programming Assignment grade: 85
Please enter Quiz grade: 88
Kelsey average grade: 84.55
Laura grades
Please enter discussion grade: 56
Please enter Programming Assignment grade: 84
Please enter Quiz grade: 76
Laura average grade: 75.00
Sandy grades
Please enter discussion grade: 63
Please enter Programming Assignment grade: 77
Please enter Quiz grade: 85
Sandy average grade: 79.70
Tiffany grades
Please enter discussion grade: 65
Please enter Programming Assignment grade: 58
Please enter Quiz grade: 78
Tiffany average grade: 71.05
    Kelsey average grade: 84.55
Laura average grade: 75.00
Laura average grade: 75.00
Sandy average grade: 79.70
Name of Student with highest grade: Kelsey
Highest grade: 84.55
    Kelsey average grade: 84.55
Laura average grade: 75.00
Laura average grade: 75.00
Sandy average grade: 79.70
Name of Student with highest grade: Kelsey
Highest grade: 84.55
    PASS
Test case # 1 Screenshot
Test case # 2 & 3 Screenshot
Test case # 4 Screenshot

Week 5 Assignment Instructions
This week's assignment involves writing a Python program to compute the weighted average grade for each student in a group of four students. In addition, it should determine which student has the highest average.Your program should include a list of four student names. You decide on the names of the four students. Each student will have three grades--one for the discussion, one for the quiz and one for the programming assignment. 
Weighted averages work by assigning a percentage weight to each grade and then multiplying the grade. (i.e a 40% weight of a grade would be   .40 * grade).  You should decide on the weights for each of the three grades, but the three weights must add to 1 and the three must be different (i.e.  .20   .30   .50). Apply the appropriate weight to each grade and sum to get the weighted average.
Your program must include a function that accepts the student name, prompts the user for the three grades and computes and returns the average.
In the main program, inside a for loop, that function should be called successively and the name of the student and the student's grade should be displayed. In addition a check should be made to determine whether that student's grade is the highest so far.
Once the loop completes, the name of the student with the highest grade, and that grade should be displayed. 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.Submit your Python program as a text file ( .py) file.  In addition, submit a Design outline and a Test plan
eport (at least 3 different test cases) in a Word document or a .pdf file and include a screen shot of execution of your program for each test case. Your submission must also adhere to the SubmissionRequirements document. (i.e. Filename and display your name, class, date in the output).
    Outline proper sequence of steps, calculations (if necessary). Identify values of any
known constants, thresholds, test conditions, loops. Identify what the use
inputs will be and what the output will be.
Test Plan/Report submitted with at least three test cases. Includes a screen shot for each
test case.
Includes (when necessary) test cases for invalid inputs.
Python code runs co
ectly on all test cases. Satisfies all requirements compiles -,
effectiveness and neatness -, descriptive variables, def main() -).
Included all of the following: Header comments. Documentation for the values you chose
as the known constants In-line comments of major steps (from design outline);
Note - actual values must be stated in the respective comments
Answered 1 days After Nov 19, 2022

Solution

Nidhi answered on Nov 19 2022
38 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here