Algorithm: Agnes Grades

Assignment:

Agnes Gru keeps track of her grades with the help of a python program, YI_AgnesGrades.py. (YI in the program name represents your initials)

agnesgru
This is her schedule:

twoLists = [['biology','chemistry','physics','horticulture', 'english','math','phys ed','spanish'],['period 1','period 2','period 3', 'period 4','period 5','period 6','period 7', 'period 8']]


##        biology        period 1
##      chemistry        period 2
##        physics        period 3
##   horticulture        period 4
##        english        period 5
##           math        period 6
##        phys ed        period 7
##        spanish        period 8

She has Test grades, Homework grades and Classwork grades for all of her classes. These categories have different weights. Homework and Classwork represent each 30% of her grade. Her test category represents 40% of her marking period grade. Write YI_AgnesGrades.py program for Agnes using functions and what your learned from twoLists.
You program should

  1. Prompt Agnes for her grades. (This function should be activated after the program is successfully completed)
  2. Calculate each category average.
  3. Calculate her final grade for the marking period for each period.
  4. End the program by displaying each of her categories percentages and her marking period grade.

Make sure you use full sentences so Agnes can easily understand the results.

Use the following data with the purpose of developing your program and assessment:
Suggestion code:

# Program description
# author's name
# python version

##################
# Use these data
##################


#Period 1

#    15 homework grades
hwk1 = [86 ,76 ,79 ,72 ,78 ,77 ,90 ,86 ,79 ,71 ,89 ,79 ,98 ,87 ,96 ]
#    20 classwork grades
clwk1 = [71 ,86 ,76 ,86 ,88 ,79 ,85 ,98 ,75 ,87 ,76 ,99 ,75 ,85 ,74 ,71 ,77 ,80 ,85 ,76 ]
#    5 test grades
tst1 = [94 ,84 ,92 ,80 ,86 ]

#Period 2

#    15 homework grades
hwk2 = [90 ,97 ,74 ,80 ,93 ,75 ,84 ,94 ,94 ,86 ,79 ,88 ,100 ,80 ,71]
#    20 classwork grades
clwk2 = [84 ,92 ,93 ,83 ,86 ,82 ,84 ,98 ,76 ,80 ,74 ,71 ,95 ,99 ,73 ,78 ,70 ,80 ,73 ,72 ]
#    5 test grades
tst2 = [95 ,83 ,85 ,96 ,86 ]

#Period 3

#    15 homework grades
hwk3 = [88 ,74 ,88 ,100 ,82 ,77 ,85 ,90 ,98 ,89 ,99 ,96 ,81 ,75 ,85 ]
#    20 classwork grades
clwk3 = [83 ,79 ,94 ,71 ,92 ,90 ,97 ,96 ,77 ,89 ,100 ,80 ,95 ,85 ,78 ,73 ,95 ,75 ,92 ,70 ]
#    5 test grades
tst3 = [83 ,92 ,88 ,85 ,99 ]

#Period 4

#    15 homework grades
hwk4 = [82 ,76 ,85 ,81 ,80 ,73 ,73 ,100 ,96 ,97 ,74 ,78 ,91 ,90 ,82 ]
#    20 classwork grades
clwk4 = [97 ,98 ,71 ,90 ,79 ,90 ,72 ,84 ,73 ,83 ,87 ,91 ,81 ,74 ,76 ,91 ,82 ,82 ,87 ,75 ]
#    5 test grades
tst4 = [96 ,87 ,82 ,82 ,94 ]

#Period 5

#    15 homework grades
hwk5 = [77 ,95 ,79 ,75 ,97 ,90 ,76 ,94 ,93 ,84 ,89 ,95 ,74 ,91 ,97 ]
#    20 classwork grades
clwk5 = [96 ,91 ,91 ,86 ,92 ,76 ,72 ,70 ,87 ,84 ,87 ,87 ,76 ,83 ,72 ,99 ,82 ,76 ,75 ,79 ]
#    5 test grades
tst5 = [81 ,84 ,100 ,84 ,81 ]

#Period 6

#    15 homework grades
hwk6 = [94 ,91 ,71 ,82 ,73 ,78 ,84 ,82 ,75 ,83 ,93 ,98 ,86 ,100 ,76 ]
#    20 classwork grades
clwk6 = [81 ,86 ,95 ,92 ,83 ,80 ,97 ,84 ,96 ,90 ,97 ,82 ,79 ,77 ,74 ,94 ,78 ,85 ,80 ,74 ]
#    5 test grades
tst6 = [87 ,92 ,85 ,96 ,89 ]

#Period 7

#    15 homework grades
hwk7 = [88 ,83 ,97 ,82 ,78 ,89 ,99 ,74 ,71 ,86 ,81 ,72 ,91 ,87 ,95 ]
#    20 classwork grades
clwk7 = [97 ,83 ,99 ,100 ,97 ,88 ,92 ,73 ,88 ,82 ,96 ,76 ,95 ,75 ,93 ,95 ,93 ,72 ,93 ,95 ]
#    5 test grades
tst7 = [92 ,94 ,95 ,81 ,87 ]

#Period 8

#    15 homework grades
hwk8 = [100 ,88 ,92 ,74 ,82 ,88 ,75 ,80 ,93 ,82 ,85 ,85 ,97 ,94 ,78 ]
#    20 classwork grades
clwk8 = [97 ,85 ,90 ,73 ,73 ,99 ,96 ,100 ,99 ,77 ,99 ,88 ,78 ,83 ,96 ,84 ,89 ,93 ,99 ,90 ]
#    5 test grades
tst8 = [90 ,88 ,91 ,94 ,89 ]

##################
# functions
##################

def homework(hwk):
    ...
    return avg
        

def classwork(clwk):
    ...
    return avg

def test(tst):
    ...
    return avg


##################
# main
##################
...
while yesNo =="y":
    ...
    ...
    hwkAvg = round(homework(hwk))
    clswkAvg = round(classwork(clwk))
    tstAvg = round(test(tst))
    print('Averages are ',hwkAvg,'for Homework', clswkAvg, 'for Classwork',tstAvg, 'for Tests')
    ....
    print("The final quarter grade for period", periodx, "is", finalGrade)
    ...


NOTE: the three dots represent missing code that you need to fill in