Difference between revisions of "CSC111 Homework 11 2018"

From dftwiki3
Jump to: navigation, search
(Created page with "~~~~ ---- =Make-Up Homework= <br /> <bluebox> This homework is a make-up homework. You can use it to replace the lowest grade you have received on Homework Assignments 1 to 1...")
 
(Make-Up Homework)
Line 15: Line 15:
 
         hws.append( HW11 )
 
         hws.append( HW11 )
  
# drop lowest
+
# drop lowest, as specified in syllabus
 
minHW = min( hws )
 
minHW = min( hws )
 
hws.remove( minHW )
 
hws.remove( minHW )

Revision as of 19:58, 19 April 2018

D. Thiebaut (talk) 20:58, 19 April 2018 (EDT)


Make-Up Homework


This homework is a make-up homework. You can use it to replace the lowest grade you have received on Homework Assignments 1 to 10.
Here is the algorithm explaining how this works:

hws = [ HW1, HW2, HW3, HW4, HW5, HW6, HW7, HW8, HW9, HW10 ]
if HW11 != None: # if you have submitted HW11
    minHW = min( hws )
    if HW11 > minHW:
         hws.remove( minHW )
         hws.append( HW11 )

# drop lowest, as specified in syllabus
minHW = min( hws )
hws.remove( minHW )

# compute average homework grade
avgHW = sum( hws )/len( hws )