TGViewer
CodeShadow CodeShadow @codeshadowcources · 77 subscribers
Post #305 34
🧾 Скрипт: Автоматическая генерация чека в .txt

code
import datetime

items = [("Пицца", 450), ("Сок", 100), ("Доставка", 200)]
total = sum(price for _, price in items)

with open("check.txt", "w") as f:
f.write(f"Чек от {datetime.date.today()}\n\n")
for name, price in items:
f.write(f"{name}: {price} руб\n")
f.write(f"Итого: {total} руб")


Мини-фискальный инструмент для проекта или MVP.
More from @codeshadowcources
  1. Oct 9, 2026🖥
  2. Oct 8, 2026Наш внутренний проект для преподавателей. Думаю, получилось отлично)
  3. Oct 8, 2026🎮 Как мы внедрили геймификацию в работу преподавателей Геймификация давно вышла за предел…
  4. Oct 6, 2026😎
  5. Oct 3, 2026😐
  6. Sep 27, 2026Пусть Codex или Claude сами напишут MCP Теперь кейс посерьёзнее. Допустим, приходит клиент…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →