Skip to content

Instantly share code, notes, and snippets.

@s-ben
Created August 7, 2015 22:34
Show Gist options
  • Save s-ben/019db3e1847973787cd6 to your computer and use it in GitHub Desktop.
Save s-ben/019db3e1847973787cd6 to your computer and use it in GitHub Desktop.
models = {
'huffy': [15, 50],
'bianci': [10, 200],
'masi': [8, 500],
'schwinn': [12, 100],
'cannondale': [6, 1000],
'trek': [9, 700]}
customers = {
'stephanie': [1200, True],
'craig': [2000, True],
'corey': [600, True],
'anna' : [80, True],
'shea' : [150, True],
'stan': [80, True]}
class Bicycle(object):
def __init__(self, price, weight, model):
self.price = price # models dict is hidden requirement.
self.weight = weight
self.model = model
class BikeShop(object):
def __init__(self, name, num_models, margin_perc):
self.name = name
self.num_models = num_models
self.inventory = {}
self.margin = margin_perc/float(100)
class Customers(object):
def __init__(self, name, funds):
self.name = name
self.money = funds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment