It's nothing but maths. Really...
# Your starting point
course = 87
finalProject = 75
exam = 82
# What I would "crunch" into a calculator besides the variables
total1 = (course * 0.6) + (finalProject * 0.2) + (exam * 0.2)
total2 = (course * 0.7) + (finalProject * 0.1) + (exam * 0.2)
# Printing my computed answers just to make sure I can tell if it gives the right output
print "Total1: %s\tTotal2: %s" % (total1, total2)
# Printing the highest one.
print "\nYour mark is: %s" % max(total1, total2)
See it in action: http://codepad.org/UsfAVC30
You might find this interesting: Interesting article from meta.programmers.stackexchange.com