Progetto contabilità generale

Presentiamo un possibile inizio di un progetto per gestire la contabilità, questa volta in italiano, anche se non sarà difficile seguirlo anche per chi non parla l’italiano, attraverso il video.

# partita doppia

class Conto:
	def __init__(self, titolo):
		self.titolo = titolo
		self.dare = 0
		self.avere = 0

	def registra(self):
		dare = input("Dare:")
		avere = input("Avere:")
		self.dare += int(dare)
		self.avere += int(avere)
		self.mostra()

	def mostra(self):
		print(f"""
	{self.titolo}
	-------------------
    dare          avere
    {self.dare}    |       {self.avere}
""")

denaro_in_cassa = Conto("Denaro in cassa")
denaro_in_cassa.registra()


Subscribe to the newsletter for updates
Tkinter templates
Avatar My youtube channel

Twitter: @pythonprogrammi - python_pygame

Videos

Speech recognition game

Pygame's Platform Game

Other Pygame's posts

Published by pythonprogramming

Started with basic on the spectrum, loved javascript in the 90ies and python in the 2000, now I am back with python, still making some javascript stuff when needed.