Skip to content

Instantly share code, notes, and snippets.

@j10sanders
Last active October 13, 2015 01:34
Show Gist options
  • Save j10sanders/d5e0a50edb029d4ed59a to your computer and use it in GitHub Desktop.
Save j10sanders/d5e0a50edb029d4ed59a to your computer and use it in GitHub Desktop.
__author__ = 'Jonathan'
class Bicycle(object):
def __init__(self, modelname, weight, cost):
self.modelname = modelname
self.weight = weight
self.cost = cost
class BikeShop(object):
def __init__(self, name, inventory, prod_cost):
self.name = name
self.inventory = inventory
self.prod_cost = prod_cost
def price(self, prod_cost):
'''#self.prod_cost = prod_cost
salecost = []
for price in self.prod_cost:
price = (price* .2) + price
salecost.append(price)
print(salecost)'''
class Customers(object):
def __init__(self, name, budget):
self.name = name
self.budget = budget
'''def who_buys(self, budget=[], selling_for=[]):
self.budget = budget
self.selling_for = selling_for
sold = []
for money in self.budget:
for price in self.selling_for:
if money > price:
sold.append("sold")
else:
sold.append("m")
return sold'''
def main():
bikegroup = [Bicycle("lilbike", 15, 100.0), Bicycle("medbike", 20, 600.0), Bicycle("bigbike", 30, 900.0), Bicycle("orangebike", 23, 650.0),
Bicycle("yellowbike", 24, 700.0), Bicycle("redbike", 24, 700.0)]
gearedup = BikeShop("Geared Up", 10, ???)
print(bikegroup)
crowd = [Customers("Jill", 200), Customers("Jon", 500), Customers("Giant", 1000)]
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment