Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Wojciech Łukasik 2020-06-09 14:07:20 +02:00
commit 6f848a2e30
2 changed files with 3 additions and 10 deletions

Binary file not shown.

13
mcda.py
View File

@ -88,10 +88,9 @@ def choseProducts():
max = j max = j
prev = max prev = max
for j in range(len(allProducts)): for j in range(len(allProducts)):
if C[max] > 0.8: if C[max] > 0.75:
if C[max] == C[j]: if C[max] == C[j]:
products.append(allProducts[j]) products.append(allProducts[j])
print(C[j])
number -= 1 number -= 1
if number == 0: if number == 0:
break break
@ -102,14 +101,8 @@ def choseProducts():
def selectedSupply(): def selectedSupply():
products = choseProducts() products = choseProducts()
supply = [] supply = []
product = ['-', '-', 0, '-', '-']
for i in range(len(products)): for i in range(len(products)):
product[0] = products[i].color supply.append([products[i].color, products[i].shape, products[i].mass, products[i].size, '-'])
product[1] = products[i].shape supply.append(['-', '-', 0, '-', '-'])
product[2] = products[i].mass
product[3] = products[i].size
supply.append(product)
product = ['-', '-', 0, '-', '-']
supply.append(product)
print(supply) print(supply)
return supply return supply