0% found this document useful (0 votes)
134 views36 pages

Computer Science Project Class Xi Vinay Venugopal

This document describes a Python program for billing services at cake shops. It contains sections on objectives, concepts used, sample inputs and outputs for billing, adding/updating/deleting items. The program uses dictionaries to store mutable item information and loops to iterate through billing processes. Users can generate bills by selecting from pre-loaded cake, egg and extra item lists, and modify these lists by adding, updating or removing items. The source code and functioning of codes are also included.

Uploaded by

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

Computer Science Project Class Xi Vinay Venugopal

This document describes a Python program for billing services at cake shops. It contains sections on objectives, concepts used, sample inputs and outputs for billing, adding/updating/deleting items. The program uses dictionaries to store mutable item information and loops to iterate through billing processes. Users can generate bills by selecting from pre-loaded cake, egg and extra item lists, and modify these lists by adding, updating or removing items. The source code and functioning of codes are also included.

Uploaded by

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

COMPUTER SCIENCE

PROJECT

CAKE SHOP BILLING SERVICES


VINAY VENUGOPAL
CLASS XI-B
ROLL NUMBER 36
1. CERTIFICATE

2. OBJECTIVES OF THE PROJECT

3. THE INTRODUCTION

4. CONCEPTS AND SOFTWARE USED

5. SAMPLE INPUT AND OUTPUT


5.1. BILLING
5.2. ADDITION OF A NEW ITEM
5.3. UPDATING THE LIST OF ITEMS
5.4. DELETING THE ITEMS

6. THE SOURCE CODE

7. SYNOPSIS OF FUNCTIONING OF THE CODES


This is to certify that Vinay Venugopal of class XI-B, Kendriya
Vidyalaya INS Dronacharya has successfully completed the
project in Computer Science subject for the academic year
2022-23 as prescribed by Mrs. K Vimala Thomas (PGT
Computer Science)
The aim of this project is to create a program which will help in
providing billing service to Cake Shops. The program must be user-
friendly with mutable information for the users to edit.
This project is developed to assist the Billing section of shops
(Specifically Cake Shops). The project is a program which
collects all the information that the buyer wants and displays
all of them for the ease of the billing sections.
This program is developed using python programming
language in Python 3.10.5. The working principal of the
software is simple for the user to understand. The software
contains pre-loaded information regarding cakes including
their weights and prices. This information is mutable according
to the requirements and can be manipulated through simple
steps in the program.
The Python Concepts used for developing the software is:
1. Python Dictionaries:
The Python Dictionaries can store data which are mutable
on demand. Its Key and Value system makes it easier to
access.
2. Python Loops:
The Python Loops are used in the program multiple times
to iterate a set of codes.
3. Python “If – Elif – Else” selective statements:
Many times, in the codes many selections had to be
performed and for such areas, Python “If-Elif-Else”
selective statements are used.

The Software used for creating the program are:

1. Python 3.10.5
2. Python IDLE 3.10
3. Spyder IDLE
The main menu of the program:

BILLING

To start the billing, we can give “1” as the input. Upon giving
1 as the input, it shows the list of cakes with egg first with their
code with a choice to move forward:
For adding any cake to the bill, one must enter “Y” or “y” or
“E” or “e” to exit
After every input of a code, the software asks the user if he/she
would like to continue adding or exit to move forward. In the
above Sample input, three cakes having codes 1, 2 and 3 are
selected.
After exiting from the “CAKES WITH EGG” Section, the
software asks the user if he/she would like to add any cakes
without egg for billing.

In the above sample, the codes 19 and 21 are chosen for billing.
Next, the program asks if the user would like to add any extra
birthday items like candles, knifes and caps. In the above
sample input, items 22, 23 and 24 are included.

Next, the bill is printed and the billing menu is again activated.
ADDITION OF A NEW ITEM

For Addition of a new item, the user must enter choice “2”

Upon entering the choice as 2, the program asks in which list


the new item must be added.

For the sample input, the changes will be made in “Cakes with
Egg” list by typing in 1:
The program asks the user how many new cakes must be
added. Based on that it asks the used that much of time.
Based on the above sample input we get the following sample
output:
After adding the new item, the user can even bill it by choosing
1 and entering the code “101” from the menu

UPDATING THE LIST OF ITEMS

For updating the list of items present, the user must enter “3”
as the choice in the main menu:

Upon entering “3”, the program asks the user the following:

For the sample input, the Birthday items is going to be


updated (Choice “3”).
Upon taking Birthday items, the program lists the items and
asks for the code of the item which had be updated.
For the sample input, the cost of Birthday Knife is updated to
10 Rs.
The updated information can be viewed instantly

This updated information can be billed by entering choice “1”.

DELETING THE ITEMS

For deleting the items, the user must enter choice “4” in the
main menu:
The program asks the usere from which he/she wants any item
to be removed.
For the sample input, list “2” is chosen (i.e., from “Cakes
without Egg” section).
Here, the code 20 is deleted from the list. Thus, the cake with
code 20 is removed from the list.

The 5th choice from the menu allows the user to see all the
cakes in the list as follows:
The final choice (i.e., 6th choice) exits from the program:
# Storage Dictionary of all the items:

CWE={1: "Black Forestry - 500 gm - 300


Rs", 2: "Black Forestry - 1kg - 600
Rs", 3: "White Forestry - 500 gm - 350
Rs", 4: "White Forestry - 1kg - 700
Rs", 5: "Butterscotch - 500 gm - 350
Rs", 6: "Butterscotch - 1kg - 700
Rs", 7: "Black Chocolate Truffle - 1kg - 800
Rs", 8: "White Chocolate Truffle - 1kg - 850
Rs", 9: "Red Bee (With Cheeze) - 1kg - 900
Rs", 10: "Plum Cake - 500 gm - 350
Rs", 11: "Plum Cake - 1kg - 700
Rs", 12: "Pinapple Cake - 1kg - 600
Rs", 13: "Strawberry Cake - 1kg - 600
Rs", 14: "Red Velvet - 1kg - 800
Rs", 15: "Grapes Cake - 1kg - 600
Rs" }
CWTE={16: "Black Forestry (WE) - 1kg -
750 Rs", 17: "White Forestry (WE) - 1kg -
750 Rs", 18: "Butterscotch (WE) - 1kg -
800 Rs", 19: "Chocolate Truffle (WE) - 1kg -
900 Rs" , 20: "Red Velvet (WE) - 1kg -
900 Rs", 21: "Plum Cake (WE) - 1kg -
700 Rs"}
Extra={22: "Birthday Candels -
10 Rs", 23: "Birthday Knife -
5 Rs", 24: "Birthday Caps -
10 Rs"}
DC= {}

print ("---------------------------------------------
-----------------------------------------------------
--")
print (" ")
print (" WELCOME TO
BILLING SOFTWARE
")
print ("
V.R, CAKES
")
print (" ")
print ("---------------------------------------------
-----------------------------------------------------
--")

while True:

TB= {}

print ("-------------------------------------
-----------------------------------------------------
----------")
print (" ")
print ("1. Start Billing.")
print("2. Add a new item.")
print("3. Update the items.")
print("4. Deleting the items.")
print("5. Show all the list.")
print("6. Exit.")

ch = int(input("Enter the Choice


[1,2,3,4,5,6]: "))

if ch == 1:

print(" ")
print("CAKES WITH EGG")
print(" ")
for i in CWE:
print(i, CWE[i])

print(" ")

ch2 = input("[Y- For Adding /E- For exit]


")

if ch2 == "Y" or ch2 == "y":

print(" ")
while True:

item = int(input("Enter The Code


For Each Items: "))

VTB = CWE[item]
TB[item] = VTB
print(" ")

ch3 = input("[Y - Conitnue to


Add/E- Exit] ")

if ch3 == "Y" or ch3 == "y":


continue
elif ch3 == "E" or ch3 == "e":
break

elif ch2 == "E" or ch2 == "e":


pass

print(" ")
print("CAKES WITHOUT EGG")
print(" ")
for i in CWTE:
print(i, CWTE[i])

print(" ")

ch4 = input("[Y- For Adding /E- For exit]


")

if ch4 == "Y" or ch4 == "y":

print(" ")
while True:
item = int(input("Enter The Code
For Each Items: "))

VTB = CWTE[item]

TB[item] = VTB
print(" ")

ch5 = input("[Y-conitnue to
add/E-exit] ")

if ch5 == "Y" or ch5 == "y":


continue
elif ch5 == "E" or ch5 == "e":
break
elif ch4 == "E" or ch4 == "e":
pass

print(" ")
e=input("Would you like to add any extra
birthday items? [Y-Yes/N-No] ")

if e == "Y" or e == "y":
print(" ")
print("BIRTHDAY ITEMS")
print(" ")
for i in Extra:
print(i, Extra[i])

print(" ")

while True:
item = int(input("Enter The Code
For Each Items: "))

VTB = Extra[item]

TB[item] = VTB
print(" ")

ch6 = input("[Y-conitnue to
add/E-exit] ")

if ch6 == "Y" or ch6 == "y":


continue
elif ch6 == "E" or ch6 == "e":
break
elif e == "N" or e == "n":
pass

print("----------------------------------
-----------------------------------------------------
-------------")
print("
V.R CAKES - BILL
")
print("----------------------------------
-----------------------------------------------------
-------------")
print("ITEMS-----------------------------
------COST-------------------------------------------
-------------")
print(" ")

for j in TB:
print(TB[j])

elif ch == 2:

print(" ")
print("In which list would you like to
add the new item?")

ch7 = input("type- [1 for Cakes with Egg]


/ [2 for Cakes without Egg] / [3 for Birthday
items]")

if ch7 == "1":

print(" ")
print("CAKES WITH EGG")
print(" ")
for i in CWE:
print(i, CWE[i])

R= int(input("Enter the number of


information to be changed"))

for i in range(R):

Num = int(input("Enter the code:


"))

key = input("Enter the Cake name,


Weight and Cost: ")
CWE[Num]=key

print("The new information: ")

print(" ")
print("CAKES WITH EGG")
print(" ")
for i in CWE:
print(i, CWE[i])

if ch7 == "2":

print(" ")
print("CAKES WITHOUT EGG")
print(" ")
for i in CWTE:
print(i, CWTE[i])

R= int(input("Enter the number of


information to be changed"))

for i in range(R):

Num = int(input("Enter the code:


"))

key = input("Enter the Cake name,


Weight and Cost: ")

CWTE[Num]=key

print("The new information: ")

print(" ")
print("CAKES WITHOUT EGG")
print(" ")
for i in CWTE:
print(i, CWTE[i])

if ch7 == "3":

print(" ")
print("BIRTHDAY ITEMS")
print(" ")
for i in Extra:
print(i, Extra[i])

R= int(input("Enter the number of


information to be changed"))

for i in range(R):

Num = int(input("Enter the code:


"))

key = input("Enter the Cake name,


Weight and Cost: ")

Extra[Num]=key

print("The new information: ")

print(" ")
print("CAKES WITH EGG")
print(" ")
for i in Extra:
print(i, Extra[i])

elif ch == 3:
print(" ")
print("In which list would you like to
update the new item?")

ch8 = input("type- [1 for Cakes with Egg]


/ [2 for Cakes without Egg] / [3 for Birthday
items]")

if ch8 == "1":

print(" ")
print("CAKES WITH EGG")
print(" ")

for i in CWE:
print(i, CWE[i])

Num = int(input("Enter the code which


has to be updated: "))
key = input("Ente the Cake name,
Weight and Cost: ")

CWE[Num]=key

print("The new information: ")

print(" ")
print("CAKES WITH EGG")
print(" ")

for i in CWE:
print(i, CWE[i])

if ch8 == "2":

print(" ")
print("CAKES WITHOUT EGG")
print(" ")

for i in CWTE:
print(i, CWTE[i])

Num = int(input("Enter the code which


has to be updated: "))

key = input("Ente the Cake name,


Weight and Cost: ")

CWTE[Num]=key

print("The new information: ")

print(" ")
print("CAKES WITHOUT EGG")
print(" ")

for i in CWTE:
print(i, CWTE[i])

if ch8 == "3":

print(" ")
print("BIRTHDAY ITEMS")
print(" ")

for i in Extra:
print(i, Extra[i])

Num = int(input("Enter the code which


has to be updated: "))

key = input("Enter The Birthday item


and its Cost: ")

Extra[Num]=key

print("The new information: ")

print(" ")
print("BIRTHDAY ITEMS")
print(" ")

for i in Extra:
print(i, Extra[i])

elif ch ==4:
print(" ")
print("In which list would you like to
delete the item?")

ch9 = input("type- [1 for Cakes with Egg]


/ [2 for Cakes without Egg] / [3 for Birthday
items]")

if ch9 == "1":
print(" ")
print("CAKES WITH EGG")
print(" ")

for i in CWE:
print(i, CWE[i])

Num = int(input("Enter the code of


the item to be deleted: "))

del CWE[Num]
print("The new information: ")

print(" ")
print("CAKES WITH EGG")
print(" ")

for i in CWE:
print(i, CWE[i])

if ch9 == "2":
print(" ")
print("CAKES WITHOUT EGG")
print(" ")

for i in CWTE:
print(i, CWTE[i])

Num = int(input("Enter the code of


the item to be deleted: "))

del CWTE[Num]

print("The new information: ")

print(" ")
print("CAKES WITHOUT EGG")
print(" ")

for i in CWTE:
print(i, CWTE[i])

if ch9 == "3":

print(" ")
print("BIRTHDAY ITEMS")
print(" ")

for i in Extra:
print(i, Extra[i])

Num = int(input("Enter the code of


the item to be deleted: "))
del Extra[Num]

print("The new information: ")

print(" ")
print("BIRTHDAY ITEMS")
print(" ")

for i in Extra:
print(i, Extra[i])

elif ch == 5:

print("----------------------------------
-----------------------------------------------------
-------------")

print(" ")
print("CAKES WITH EGG")
print(" ")

for i in CWE:
print(i, CWE[i])

print("----------------------------------
-----------------------------------------------------
-------------")

print(" ")
print("CAKES WITHOUT EGG")
print(" ")

for i in CWTE:
print(i, CWTE[i])

print("----------------------------------
-----------------------------------------------------
-------------")

print(" ")
print("BIRTHDAY ITEMS")
print(" ")

for i in Extra:
print(i, Extra[i])

print("----------------------------------
-----------------------------------------------------
-------------")

elif ch == 6:
break
The Following code provides us the dictionaries which already
consists of some information about Cakes
CWE is a dictionary which contains all the information about
Cakes with Egg.
CWTE is a dictionary which contains all the information about
Cakes without Egg
Extra is a dictionary which contains some Birthday Items
Each product is given a code. These codes are the keys for
each of them and each key contains the information of the
product as string including:
1. Cake name
2. Cake weight
3. Cost

Billing Menu
This code lists out the Codes
(Keys) and the cake information The following program
(Value) using a for loop converts all the information
entered a new dictionary the
keys as the same key each
value possessed in their
individual dictionaries.
This new dictionary is TB = {}
where TB stands for
Temporary Bill.
The above code prints the bill. The heading is printed with the
print command while the body of the bill is printed by a for loop
which prints the values only of the temporary bill (TB)

The above code adds the new information w in to the CWE


dictionary. Similar codes have been contracted for CWTE dictionary
and Extra dictionary.
For addition of new information, program has a for loop which
iterates until all the new information are added to these dictionaries.
After addition, all the dictionaries are printed.
The above code is for bringing an update into the existing code.
The program asks for the key and the corresponding value is changed.
After changing the value, the new list is printed for the user to view the
modified list.

You might also like