Leia esse arquivo em português
The purpose of this work is practice the lessons learned in th Python's intensive course "Fluência em Python - Do básico ao avançado".
Create a "system" for a store of any kind (marketplace, video shop, book store), using files. The initial file will be a list containing the produts, its prieces and quantity stored. The products are separated in lines.
- Have a menu.
- Read the informations and create a table of products.
- Add produts to the file.
- Calculate the total of a store and remove the shoped products from the storage.
- Calculate the total of all shops made during one program execution.
- Close the program.
The intensive course "FLuência em Python - Do básico ao avançado" was created by Tamires da Hora dos Santos and Marcos Augusto do Amaral for the 1st Week courses of the AsimUFF team.
- Products table: Shows all the products in the file, its priece and quantity stored.
- Shop: Receives the products and how many of them will be shoped, remove the quantity shoped from the storage and add them to the shop list.
- Daily earnings: Shows the total of all shops during the program execution.
- Add products: Adds a new product to the storage. Also update the priece and quantity of products already stored.
- Show menu: Shows the menu one more time.
- Exit: Closes the program.
- menu(l): Receives a list containing all the menu options and write them in the terminal.
- tabela(): Creates a table (using formatation) in the terminal using the data of the file.
- notaFiscal(matriz): Receives a list of lists containing all the shopped products and writes a shop list, adding the total of the shop.
- atualizaTabela(matriz): Receives a list of lists containing the updated products em puts them in the file.
- compra(): Makes the shopping operations and updates the storage.
- ganhosDia(): Writes in the terminal the daily earnings in Reals and show the products sold.
- addi(): Adds products to the storage.
- main(): Shows the menu and call the others functions.