0% found this document useful (0 votes)
3 views

Aayan Python Program

The document is a Python script for a school store billing system that prompts the user for their name, item details, and calculates the total cost of items purchased. It allows multiple entries until the user inputs 'done', and displays the total bill amount at the end. Additionally, it calculates a savings amount based on the total cost, though there is an error in the rounding function used.

Uploaded by

anjanapanda12
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Aayan Python Program

The document is a Python script for a school store billing system that prompts the user for their name, item details, and calculates the total cost of items purchased. It allows multiple entries until the user inputs 'done', and displays the total bill amount at the end. Additionally, it calculates a savings amount based on the total cost, though there is an error in the rounding function used.

Uploaded by

anjanapanda12
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

import math

import datetime
print("My School Store")
print("customer bill")
print("Date:", datetime.date.today())
total_cost=0
for i in range(1,100):
print("what is your name?")
name=input()
item_name=input("enter the item name:")
if (item_name=="done" or item_name=="Done" or item_name=="DONE"):
break
item_quantity=float(input("enter the item quantity "))
item_price=float(input("enter the item price per unit"))
item_cost=item_quantity*item_price
print("Cost of ",item_quantity," unit of",item_name,"is",item_price,"which has
a total cost of Rs",item_cost)
print("Cost of ",item_quantity," unit of",item_name,"@
Rs.",item_price,"is",item_cost)
total_cost=total_cost+item_cost

print("Total Bill amount of",i-1, "item is Rs.", total_cost)

print("you saved", math.round(total_cost/10), "rupees on your total bill amount.")

You might also like