Created
March 27, 2012 15:27
-
-
Save jeremyjbowers/2216982 to your computer and use it in GitHub Desktop.
A function to compute College Football passer rating.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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