Receipt Calculator along with Item name
print('WELCOME TO CITY CENTER ROHINI WEST\n\n')
from prettytable import PrettyTable
table = PrettyTable(['Item Name','Item Price'])
total=0
while(1):
name= input('Enter Item name:\n')
if(name != 'q'):
price = int(input('Enter the Price:\n'))
total += price
table.add_row([name,price])
print('Data added')
continue
elif(name == 'q'):
break
table.add_row(['TOTAL',total])
print(table)
print('\nThanks for shopping with us :)')
print(f'Your total bill amount is {total}/-')
https://www.geeksforgeeks.org/creating-a-receipt-calculator-using-python/
ReplyDelete