2
0
forked from s444420/AL-2020
AL-2020/product.py

37 lines
740 B
Python
Raw Normal View History

2020-06-09 15:21:36 +02:00
from coder import create_image
2020-06-09 18:22:14 +02:00
from assigning import assigning
2020-06-09 15:21:36 +02:00
2020-05-19 17:45:15 +02:00
class Product:
def __init__(self, color, shape, mass, size):
self.color = color
self.shape = shape
self.mass = mass
2020-06-09 15:21:36 +02:00
self.size = size
class FinalProduct:
def __init__(self, color, shape, mass, size, name):
self.color = color
self.shape = shape
self.mass = mass
self.size = size
self.name = name
if size == 'small':
self.price = 2.99
if size == 'medium':
self.price = 3.99
if size == 'big':
self.price = 4.99
self.img = create_image(self)
2020-06-09 18:22:14 +02:00
def shelf(self):
2020-06-09 19:09:46 +02:00
print(self.img)
2020-06-09 18:22:14 +02:00
return assigning(self.img);