#! /usr/bin/python # Brandon Schaffer import sys,os # Implement a late policy # Script must echo points to deduct from total (positive number) # Script is passed number of hours late and totalPoints for assignment # in the simplest case, this script could just echo a constant (e.g. 20) # This script is ONLY invoked if the file being graded is named LATE_xxx # See gradeAssignment script for use hoursLate = int(sys.argv[1]) totalPoints = float(sys.argv[2]) daysLate = hoursLate / 24 prod = daysLate * 24 if prod < hoursLate: daysLate += 1; # This allows the TA to use forceCheckin, but only a 2 day penalty if daysLate > 2: daysLate = 2; # cs161 Spring10 policy on late (10% per day) latePoints=(daysLate * totalPoints) / 10 print latePoints