-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
24 lines (22 loc) · 894 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from menu import products
from management.product_handler import get_product_by_id
from management.product_handler import get_products_by_type
from management.product_handler import add_product
from management.product_handler import menu_report
from management.tab_handler import calculate_tab
if __name__ == "__main__":
# Seus prints de teste aqui
print(get_product_by_id(28))
print(get_products_by_type('drink'))
new_product = {"title": "X-Python", "price": 5.0, "rating": 5, "description": "Sanduiche de Python", "type": "fast-food"}
print(add_product(products, **new_product))
table_1 = [{"_id": 1, "amount": 5}, {"_id": 19, "amount": 5}]
table_2 = [
{"_id": 10, "amount": 3},
{"_id": 20, "amount": 2},
{"_id": 21, "amount": 5},
]
print(calculate_tab(table_1))
print(calculate_tab(table_2))
print(menu_report())
...