Skip to content

Instantly share code, notes, and snippets.

tombrereton tombrereton

Block or report user

Report or block tombrereton

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View number_of_sweets_sum.py
import time
def number_of_sweets(days):
"""
This function assumes the parameter, days, contains a list of integers in ascending order.
optimised function where the
sum_of_sweets counts every odd number and keeps track of the previous calculation.
This function more clearly displays its efficiency for very long lists.
You can’t perform that action at this time.