Cash Register

Ryan Q. RQuinn15 at optonline.net
Tue May 11 14:32:33 EDT 2004


It works, i'm just posting it hoping someone could do better.

print ''
print ' *** CASH REGISTER ***'
print ' PRESS 0 AND THEN ENTER TO TOTAL'
b = 1
t = 0
v = 0
while b != 0:
	a = 1
	s = 0
	print ''
	while a != 0:
	    a = input(' ITEM          $ ')
	    s = s + a
	print        '        TOTAL  $',s
	v = v + s
	cash = input('         CASH  $ ')
	change = cash - s
	print '       CHANGE  $',change
	print ' '
	print ' TOTAL SLAES $ ',v



More information about the Python-list mailing list