Skip to content

Instantly share code, notes, and snippets.

@dogweather
Last active December 31, 2015 06:59
Show Gist options
  • Save dogweather/7950848 to your computer and use it in GitHub Desktop.
Save dogweather/7950848 to your computer and use it in GitHub Desktop.
Define a function
def percentage_of_whole(part1, part2):
return float(part1) / (part1 + part2) * 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment