Skip to content

Instantly share code, notes, and snippets.

@jeremyjbowers
Created March 27, 2012 15:27
Show Gist options
  • Save jeremyjbowers/2216982 to your computer and use it in GitHub Desktop.
Save jeremyjbowers/2216982 to your computer and use it in GitHub Desktop.
A function to compute College Football passer rating.
def handle_cfb_passer_rating(yds, tds, cmpls, ints, atts):
""" Defines a function which computes NCAA passer rating."""
yards = 8.4 * yds
touchdowns = 330 * tds
completions = 100 * cmpls
interceptions = 200 * ints
rating = yards + touchdowns + completions - interceptions
return float(rating / atts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment