Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Function to calculate view-to-sub ratio
# Function to calculate view-to-sub ratio
def view_to_sub_ratio(viewcount, num_subscribers):
if num_subscribers == 0:
return 0
else:
ratio = viewcount / num_subscribers
return ratio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.