Skip to content

Instantly share code, notes, and snippets.

@Joshuaek
Created March 4, 2020 21:44
Show Gist options
  • Save Joshuaek/6fb6cd906d46d53f3a92296a12a8ec0a to your computer and use it in GitHub Desktop.
Save Joshuaek/6fb6cd906d46d53f3a92296a12a8ec0a to your computer and use it in GitHub Desktop.
class contract:
def __init__(self, start_month, payment_frequency, value, term, contract_name, increase_period=1, increase_percentage=0):
self.start_month = start_month # The month (zero based int) at which the contract starts
self.payment_frequency = payment_frequency # The frequency of payments (e.g. 1 for monthly, 3 for quarterly, 12 for annually)
self.value = value # The money recieved from the contract
self.term = term # The duration of the contract in months
self.contract_name = contract_name # An identifier for the contract
self.increase_period = increase_period # Optional frequency of price increases (e.g. 12 for an annual inflation)
self.increase_percentage = increase_percentage # Optional percentage increase (e.g. 2.5 for a 2.5% price increase)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment