Skip to content

Instantly share code, notes, and snippets.

""" A simple script to calculate the diference within two courses """
def course_delta(c1, c2):
""" Calculate the diference within two consecutive courses """
if c2 < c1:
# The function expects that c2 is always greater than c1
temp = c2
c2 = c1 # switch the values of c1 and c2
c1 = temp