0% found this document useful (0 votes)
26 views11 pages

Report File

Uploaded by

rayu1905
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views11 pages

Report File

Uploaded by

rayu1905
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

SANSKAAR INTERNATIONAL SCHOOL

C.S. PROJECT FILE

TOPIC:
SIMPLE BILLING SYSTEM
ALL INDIA SENIOR SCHOOL CERTIFICATE EXAMINATION
(AISSCE 2023-2024)

NAME-NITIN SINGH
CLASS-11 SCIENCE
Roll No-46
INDEX

1. Certificate
2. Acknowledgement
3. Aim
4. Coding with Screenshots
5. Requirements
6. Bibliography
SANSKAAR INTERNATIONAL SCHOOL

CERTIFICATE
This is to certify that NITIN SINGH have successfully
completed this project report.
entitled:
"SIMPLE BILLING SYSTEM"
During the academic year 2023-2024 towards partial
fulfilment of C.S.Practical Examination conducted by CBSE.

------------------------ ----------------------------
Teacher’s Signature Principal’s Signature

-----------------------------------
External Invigilator’s Signature
ACKNOWLEDGEMENT

I would like to thanks my computer science teacher


Mr. SHRAVAN YADAV who gave me golden
opportunity to complete this wonderful project
entitled
‘SIMPLE BILLING SYSTEM’
I am indebted to our principal
Ms.AMRITA AGARWAL who has always been
a source of encouragement and support.

NITIN SINGH
11-Science
Roll No-46

AIM
1. User Interface

 Create a simple command-line interface to interact with the billing system.

 Display options for the user, such as:

 Add a new item

 View items and prices

 Generate a bill

 Exit

2. Item Management

 Allow users to add new items with their respective prices.

 Store items and prices in a data structure (e.g., dictionary).

3. Cart Management

 Allow users to add items to their cart.

 Track the quantity and total cost of items in the cart.

4. Generate Bill

 Calculate the total cost of items in the cart.

 Display the items, quantities, prices, and the total amount in a bill.

5. Data Persistence (Optional)

 Implement a way to save and load item information, so it persists between


sessions. You can use a simple file-based approach (e.g., CSV).

6. Error Handling

 Implement error handling for invalid inputs, such as non-existent items or


incorrect quantities

CODING WITH SCREENSHOT


class BillingSystem:
def __init__(self):
self.items = {}

def add_item(self, item, quantity, price):


self.items[item] = {'quantity': quantity,
'price': price}

def generate_bill(self):
total_amount = 0
print("\n===== Bill =====")
print("{:<15} {:<10} {:<10}".format("Item",
"Quantity", "Total Price"))
print("=" * 35)

for item, details in self.items.items():


quantity = details['quantity']
price = details['price']
total_price = quantity * price
total_amount += total_price

print("{:<15} {:<10} {:<10}".format(item,


quantity, total_price))

print("=" * 35)
print("Total Amount:
{:.2f}".format(total_amount))

def billing_system_app():
billing_system = BillingSystem()

while True:
print("\n===== Simple Billing System =====")
print("1. Add Item")
print("2. Generate Bill")
print("3. Exit")
choice = input("Enter choice (1/2/3): ")

if choice == '1':
item = input("Enter Item Name: ")
quantity = int(input("Enter Quantity: "))
price = float(input("Enter Price per Unit: "))
billing_system.add_item(item, quantity,
price)
print("Item added successfully!")
elif choice == '2':
billing_system.generate_bill()
elif choice == '3':
print("Exiting the Billing System.
Goodbye!")
break
else:
print("Invalid Input. Please enter a valid
choice.")

if __name__ == "__main__":
billing_system_app()
REQUIREMENTS
1. Python Installed:

 Make sure you have Python installed on your machine.

2. Code Editor or IDE:

 Visual Studio Code, PyCharm, or Jupyter Notebooks.

3. Basic Python Knowledge.

4. Terminal or Command Prompt.

5. Problem-Solving Skills:

 Be prepared to troubleshoot and debug your code.


BIBLIOGRAPHY
1. Python Documentation:
2. Programming Books:
 "Computer Science with python" by Sumita
Arora: This book is beginner-friendly and
covers the basics of Python programming.
3. Documentation for Data Structures:
 Python Data Structures: This section of the
Python documentation explains data
structures like lists, dictionaries, and tuples.
4. Error Handling and Exception Handling:
 Python Official Documentation - Errors and
Exceptions: Understanding how to handle
errors will be beneficial for robust code.

You might also like