Last active
November 1, 2025 17:37
-
-
Save caruccio/f84b5caaa7c9a64e372277a26e9ba8f0 to your computer and use it in GitHub Desktop.
Revisions
-
caruccio revised this gist
Nov 1, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ def pizza(qtd_bolas: int, peso_bola: int, hid: int = 75) -> dict: return dict(items) b = 6; b = int(input(f'Qtd de pizzas [{b}]: ') or b) p = 280; p = int(input(f'Peso/pizza [{p}]: ') or p) h = 75; h = int(input(f'% hidratacao [{h}]: ') or h) p = pizza(b, p, h) print('-' * 19) -
caruccio created this gist
Nov 1, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ #!/usr/bin/env python3 def pizza(qtd_bolas: int, peso_bola: int, hid: int = 75) -> dict: peso_total = qtd_bolas * peso_bola sal_g = peso_total * 0.02 ferm_g = 1 agua_g = (peso_total / (hid + 100)) * 70 farinha_g = peso_total - sal_g - agua_g items = [('farinha', farinha_g), ('agua', agua_g), ('ferm', ferm_g), ('sal', sal_g)] return dict(items) b = 6; b = int(input(f'Qtd de pizzas [{b}]: ') or b) p = 280; p = int(input(f'Peso/pizza: [{p}]: ') or p) h = 75; h = int(input(f'% hidratacao [{h}]: ') or h) p = pizza(b, p, h) print('-' * 19) print('\n'.join([ f'{i:10}: {v:0.2f}g' for i, v in p.items()]))