Billing Software
Billing Software
_______________ ________________
Internal Examiner External Examiner
________
Principal
1|Page
ACKNOWLEDGMENT
2|Page
CONTENTS
1. Introduction
2. Hardware and Software Required
3. Python Source Code
4. Outputs
5. References
3|Page
INTRODUCTION
In today’s fast-paced world, businesses rely on efficient and
accurate billing systems to manage their sales and maintain
customer satisfaction. The project Billing Software aims to
provide a simple yet functional solution for generating customer
bills. Designed as a part of the Class 12th Computer Science
curriculum, this project demonstrates how Python can be utilized
to build real-world applications by combining logic and user
interaction.
4|Page
HARDWARES AND
SOFTWARES REQUIRED
HARDWARES
1. Desktop Computer
2. Mobile Phone
SOFTWARES
1. Python (Latest Version)
2. Visual Studio Code
5|Page
PYTHON SOURCE CODE
import datetime
items = {
"101": {"name": "Milk\t", "price": 50},
"102": {"name": "Bread\t", "price": 40},
"103": {"name": "Eggs\t", "price": 8},
"104": {"name": "Butter\t", "price": 60},
"105": {"name": "Chocolate", "price": 20},
"106": {"name": "Pastry\t", "price": 40},
"107": {"name": "Donut\t", "price": 25},
"108": {"name": "Biskoot\t", "price": 10},
"109": {"name": "Patties\t", "price": 20},
"110": {"name": "Smoothie ", "price": 20}
}
def main():
print("\nWelcome to the XYZ Store")
customer_name = input("Please enter your name: ")
print(f"Hello, {customer_name}!\n")
bill_items = {}
total_amount = 0
while True:
print("\nAvailable Items:")
for item_id, details in items.items():
print(f"ID: {item_id}, Name: {details['name']}, Price:
{details['price']}")
if item_id in items:
try:
quantity = int(input("How many would you like to buy? "))
7|Page
if quantity <= 0:
print("Quantity must be greater than zero. Please try
again.")
continue
item_name = items[item_id]['name']
item_price = items[item_id]['price']
if item_id in bill_items:
bill_items[item_id]['quantity'] += quantity
else:
bill_items[item_id] = {
'name': item_name,
'price': item_price,
'quantity': quantity
}
if bill_items:
print_receipt(bill_items, total_amount, customer_name)
else:
print("No items purchased.")
if __name__ == "__main__":
main()
8|Page
OUTPUTS
9|Page
10 | P a g e
11 | P a g e
REFERENCES
2. www.google.com
12 | P a g e