You are on page 1of 44

VISHWA BHARATI

PUBLIC SCHOOL
DWARKA
Customizable phone
management system
NAME: KHUSH VERMA
CLASS:XII “RUBY”
SESSION:2023-2024
ROLL NO:
1
TABLE OF
CONTENT
SN.O DISCRIPTION
Certificate
1
Acknowledgement
2
synopsis
3
Source code
4
Output
5
Bibliography
6
2
CERTIFICATE
This is to certify that Khush Verma of class
XII has prepared the report of Project of
Customizable phone management. The report
is the result of his/her efforts & endeavors.
The report is found worthy of acceptance as
final projec treport of subject Computer
Science of class XII. He has prepared the
Project under my guidance.

(Ranjana Gandhi)
PGT Computer Science.

3
ACKNOWLEDGEMENT
It is indeed with a great pleasure and
immense sense of gratitude that we
acknowledge the help of these
individuals.
We feel related in manifesting our
sense of gratitude to our computer
science teacher Ms.Ranjana Gandhi.
She has been a constant source of
inspiration for us and we are very
deeply thankful to her for her
support and valuable advice.
Finally we expressed our heartfelt
thanks to all of our friends who
helped us in successful completion
of this project.

4
SYNOPSIS

The project “CUSTOMIZABLE PHONE


MANAGEMENT SYSTEM” is a system to manage the
records of phone sold to customized phone shop.
This system also helps placing the order.

OBJECTIVE
1. Helps in placing viewing all the options to customize the
phone.
2. provide the bill.

WORKING ENVIRONMENT
Python is a popular programming language. It
was created by GUIDO VAN ROSSUM and
released in 1991.
MySQL is an open source relational database
management system. MySQL is developed ,
distributed and supported by Oracle
corporation.
5
HARDWARE AND SOFTWARE
SPECIFICATIONS
HARDWARE:
PROCESSOR: Pentium G2030 @3.70 GHz
PROCESSOR SPEED: 533 MHz
RAM: 2 GB or more
HARD DISK: 2.00 GB

SOFTWARE:
OPERATING SYSTEM: WINDOWS 11
IDE: IDLE PYTHON
FRONT END: PYTHON 3.6 or above
BACK END: MySQL server 5.0 or above

6
SOURCE
CODE

7
print("*************************************
************************")
print("*************************************
***********************")
print("\\\\\\\\\\\\\\\\******************/////////
////")
print("* *")
print("* \tcustomized phone\t *")
print("* \tMADE BY KHUSH AND VANSH\t *")
print("\\\\\\\\\\\\\\\\\*****************//////////
///")
print("*************************************
*************************")
print("*************************************
*************************")
import mysql.connector
mydb = mysql.connector.connect(host='localhost',
user='root', passwd='12345',
database='customizable_phone')
mycursor = mydb.cursor()

8
mycursor.execute("CREATE TABLE IF NOT EXISTS
IPHONE (Sno INT AUTO_INCREMENT PRIMARY KEY,
Model VARCHAR(255), Stock INT)")
mycursor.execute("CREATE TABLE IF NOT EXISTS
REDMI (Sno INT AUTO_INCREMENT PRIMARY KEY,
Model VARCHAR(255), Stock INT)")
mycursor.execute("CREATE TABLE IF NOT EXISTS
ONEPLUS (Sno INT AUTO_INCREMENT PRIMARY KEY,
Model VARCHAR(255), Stock INT)")
mydb.commit()
initial_iphone_inventory = [("ModelA", 50),
("ModelB", 75), ("ModelC", 100)]
initial_redmi_inventory = [("ModelX", 80), ("ModelY",
120), ("ModelZ", 150)]
initial_oneplus_inventory = [("ModelOne", 60),
("ModelTwo", 90), ("ModelThree", 110)]
# Insert initial data into respective tables
for i in initial_iphone_inventory:
mycursor.execute("INSERT INTO IPHONE (Model,
Stock) VALUES (%s, %s)", (i))
for i in initial_redmi_inventory:
mycursor.execute("INSERT INTO REDMI (Model,
Stock) VALUES (%s, %s)", (i))

9
for i in initial_oneplus_inventory:
mycursor.execute("INSERT INTO ONEPLUS (Model,
Stock) VALUES (%s, %s)", (i))
mydb.commit()

def IPHONE_inventory():
sql = 'SELECT * FROM IPHONE'
mycursor.execute(sql)
rows = mycursor.fetchall()
print('+-----------------+')
for i in rows:
print(i)
print('+-----------------+')
while True:
print()
print("Go back to MENU")
print()
print("Press 1")
print()
Ch = int(input("Enter Your Choice:"))
if Ch == 1:
break
else:
quit()

10
def REDMI_inventory():
sql = 'SELECT * FROM REDMI'
mycursor.execute(sql)
rows = mycursor.fetchall()
print('+-----------------+')
for i in rows:
print(i)
print('+-----------------+')
while True:
print()
print("Go back to MENU")
print()
print("Press 1")
print()
Ch = int(input("Enter Your Choice:"))
if Ch == 1:
break
else:
quit()
def ONEPLUS_inventory():
sql = 'SELECT * FROM ONEPLUS'
mycursor.execute(sql)
rows = mycursor.fetchall()
print('+-----------------+')
for i in rows:
print(i)
print('+-----------------+')

11
while True:
print()
print("Go back to MENU")
print()
print("Press 1")
print()
Ch = int(input("Enter Your Choice:"))
if Ch == 1:
break
else:
quit()
def register_user():
# Registering a new user
print("Register a new user:")
username = input("Enter a username: ")
password = input("Enter a password: ")
sql = "INSERT INTO users (username, password)
VALUES (%s, %s)"
values = (username, password)
mycursor.execute(sql, values)
mydb.commit()
print("User registered successfully!")
12
def authenticate_user():
# Authenticating a user
print("User Authentication:")
username = input("Enter your username: ")
password = input("Enter your password: ")
sql = "SELECT * FROM users WHERE username=%s
AND password=%s"
values = (username, password)
mycursor.execute(sql, values)
user = mycursor.fetchone()
if user:
print("Authentication successful! Welcome, " +
username)
return True
else:
print("Authentication failed. Invalid username
or password.")
return False
def customer_entry():
# ... (your existing customer_entry function)
13
if not authenticate_user():
print("Authentication failed. Access denied.")
return
L = []
print("========================================
=====================")
print()
print()
Sno = input("Enter Sno:-")
L.append(Sno)
print()
Name = input("Enter your Name:-")
L.append(Name)
print()
Phone_no = input("Enter your Phone Number:-")
L.append(Phone_no)
print()
Address = input("Enter Address:-")
L.append(Address)
print()
r = int(input("Enter Sno from RAM & ROM to
choose:-"))
mycursor.execute("select * from RAM_ROM
where Sno={}".format(r))
14
for i in mycursor:
RAM_ROM = (i[1])
u = int(i[2])
L.append(RAM_ROM)
print()
c = input("Enter Sno from CAMERA to choose:-")
mycursor.execute("select * from CAMERAS where
Sno={}".format(c))
for i in mycursor:
CAMERAS = (i[1])
v = int(i[2])
L.append(CAMERAS)
print()
p = input("Enter Sno from PROCESSORS to
choose:-")
mycursor.execute("select * from PROCESSORS
where Sno={}".format(p))
for i in mycursor:
PROCESSORS = (i[1])
w = int(i[2])
L.append(PROCESSORS)
print()
b = input("Enter Sno from BATTERY to choose:-")
mycursor.execute("select * from BATTERY where
Sno={}".format(b))
for i in mycursor:
BATTERY = (i[1])
15
x = int(i[2])
L.append(BATTERY)
print()
d = input("enter Sno from DISPLAYS to choose:-")
mycursor.execute("select * from DISPLAYS where
Sno={}".format(d))
for i in mycursor:
DISPLAYS = (i[1])
y = int(i[2])
L.append(DISPLAYS)
print()
print("========================================
=====================")
customer_entry = (L)
sql = "insert into
customer_entry(Sno,Name,Phone_no,Address,RAM_RO
M,CAMERA,PROCESSORS,BATTERY,DISPLAY_UNIT)
values(%s,%s,%s,%s,%s,%s,%s,%s,%s)"
mycursor.execute(sql, customer_entry)
mydb.commit()
print()
print("---------------------------------------------------------")
print(L)
print()
print("+~~~~~~~~~~~~~~~~~~~~~~~~~+")
summ = u + v + w + x + y
print("|OUTSTANDING AMOUNT = Rs.", summ, "|")
16
print("+~~~~~~~~~~~~~~~~~~~~~~~~~+")
print()
print("Kindly Pay Your Bill")
print("Thank You")
print("---------------------------------------------------------")
while True:
print()
print("Go Back To Menu")
print()
print("Press 1")
print()
ch = int(input("Enter Your Choice:"))
if ch == 1:
break
else:
quit()

def RAM_ROM():
# Existing RAM_ROM function without
modification
sql = "select * from RAM_ROM"
mycursor.execute(sql)
rows = mycursor.fetchall()
print("+--------------------+")
for i in rows:
print(i)
print("+--------------------+")
while True:
17
print()
print("Go Back To Menu")
print()
print("Press 1")
print()
ch = int(input("Enter Your Choice"))
if ch == 1:
break
else:
quit()
def PROCESSORS():
# Existing PROCESSORS function without
modification
sql = 'select * from PROCESSORS'
mycursor.execute(sql)
rows = mycursor.fetchall()
print('+---------------+')
for i in rows:
print(i)
print('+---------------+')
while True:
print()
print("Go back to MENU")
print()
print("press 1")
print()
Ch = int(input("Enter Your Choice:"))

18
if Ch == 1:
break
else:
quit()
def CAMERAS():
# Existing CAMERAS function without modification
sql = 'select * from CAMERAS'
mycursor.execute(sql)
rows = mycursor.fetchall()
print("+---------------+")
for i in rows:
print(i)
print("+---------------+")
while True:
print()
print("Go back to MENU")
print()
print("Press 1")
print()
Ch = int(input("Enter Your Choice:"))
if Ch == 1:
break
else:
quit()
def BATTERY():
# Existing BATTERY function without modification
sql = 'select * from BATTERY'
mycursor.execute(sql)
19
rows = mycursor.fetchall()
print('+---------------+')
for i in rows:
print(i)
print('+---------------+')
while True:
print()
print("Go back to MENU")
print()
print("press 1")
print()
Ch = int(input("Enter Your Choice:"))
if Ch == 1:
break
else:
quit()
def DISPLAYS():
# Existing DISPLAYS function without modification
sql = 'select * from DISPLAYS'
mycursor.execute(sql)
rows = mycursor.fetchall()
print('+---------------+')
for i in rows:
print(i)
print('+---------------+')
while True:
print()
20
print("Go back to MENU")
print()
print("press 1")
print()
Ch = int(input("Enter Your Choice:"))
if Ch == 1:
break
else:
quit()
def inventory_entry():
# Existing inventory_entry function without
modification
print("Enter the details for the new inventory
item:")
brand = input("Enter the brand (Vivo, Oppo,
iPhone, Samsung): ")
model = input("Enter the model: ")
quantity = int(input("Enter the quantity: "))
sql = "INSERT INTO inventory (brand, model,
quantity) VALUES (%s, %s, %s)"
values = (brand, model, quantity)
mycursor.execute(sql, values)

21
mydb.commit()
def display_inventory():
# Existing display_inventory function without
modification
sql = 'select * from inventory'
mycursor.execute(sql)
rows = mycursor.fetchall()
print('+----------------------+')
print('| Inventory
|')
print('+----------------------+')
print('| ID | Brand | Model | Quantity |')
print('+----------------------+')
for row in rows:
print('|', row[0], '|', row[1], '|', row[2], '|',
row[3], '|')
print('+----------------------+')
while True:
print()
print("Go back to MENU")
print()
print("press 1")
print()
Ch = int(input("Enter Your Choice:"))
if Ch == 1:
break
else:
22
quit()
while True:
print()
print("MENU")
print("Enter 1 : To see RAM_ROM table")
print("Enter 2 : To see CAMERAS table")
print("Enter 3 : To see PROCESSORS table")
print("Enter 4 : To see BATTERY table")
print("Enter 5 : To see DISPLAYS table")
print("Enter 6 : To Enter customer data")
print("Enter 7 : To see IPHONE inventory")
print("Enter 8: To see REDMI inventory")
print("Enter 9: To see ONEPLUS inventory")
print("Enter 10: User Authentication")
print("Enter 11: To exit")
print()
user_input = int(input("Enter your choice : "))
if user_input == 1:
print()
RAM_ROM()
elif user_input == 2:
print()
CAMERAS()

23
elif user_input == 3:
print()
PROCESSORS()
elif user_input == 4:
print()
BATTERY()
elif user_input == 5:
print()
DISPLAYS()
elif user_input == 6:
print()
customer_entry()
elif user_input == 7:
print()
IPHONE_inventory()
elif user_input == 8:
print()
REDMI_inventory()
elif user_input == 9:
24
print()
ONEPLUS_inventory()
elif user_input == 10:
print()
register_user()
elif user_input == 11:
print()
print("!!!Thank You!!!")
quit()
else:
print()
print("!! You Have Chosen Wrong Choice")
print("enter correct choice")

25
OUTPUT

26
*****************************************
********************
*****************************************
*******************
\\\\\\\\******************/////////////
**
* customized phone
*
* MADE BY KHUSH AND VANSH *
\\\\\\\\\*****************/////////////
*****************************************
*********************
*****************************************
*********************
MENU
Enter 1 : To see RAM_ROM table
Enter 2 : To see CAMERAS table
Enter 3 : To see PROCESSORS table
Enter 4 : To see BATTERY table
Enter 5 : To see DISPLAYS table
Enter 6 : To Enter customer data
Enter 7 : To see IPHONE inventory
Enter 8: To see REDMI inventory
Enter 9: To see ONEPLUS inventory
Enter 10: User Authentication
27
Enter 11: To exit
Enter your choice : 10
Register a new user:
Enter a username: khush14
Enter a password: vbpsd
User registered successfully!
MENU
Enter 1 : To see RAM_ROM table
Enter 2 : To see CAMERAS table
Enter 3 : To see PROCESSORS table
Enter 4 : To see BATTERY table
Enter 5 : To see DISPLAYS table
Enter 6 : To Enter customer data
Enter 7 : To see IPHONE inventory
Enter 8: To see REDMI inventory
Enter 9: To see ONEPLUS inventory
Enter 10: User Authentication
Enter 11: To exit
Enter your choice : 1
+--------------------+
(1, '4GB & 32GB', 1500)
(2, '4GB & 64GB', 2000)
(3, '6GB & 32GB', 2000)
28
(4, '6GB & 64GB', 2500)
(5, '6GB & 128GB', 3500)
(6, '8GB & 64GB', 3000)
(7, '8GB & 128GB', 4000)
(8, '8GB & 256GB', 6000)
+--------------------+
Go Back To Menu
Press 1
Enter Your Choice1
MENU
Enter 1 : To see RAM_ROM table
Enter 2 : To see CAMERAS table
Enter 3 : To see PROCESSORS table
Enter 4 : To see BATTERY table
Enter 5 : To see DISPLAYS table
Enter 6 : To Enter customer data
Enter 7 : To see IPHONE inventory
Enter 8: To see REDMI inventory
Enter 9: To see ONEPLUS inventory
Enter 10: User Authentication
Enter 11: To exit
Enter your choice : 2

29
+---------------+
(1, '12MP', 500)
(2, '16MP', 1000)
(3, '32MP', 1500)
(4, '44MP', 2000)
(5, '48MP', 2500)
(6, '64MP', 3000)
(7, '108MP', 3500)
+---------------+
Go back to MENU
Press 1
Enter Your Choice:1
MENU
Enter 1 : To see RAM_ROM table
Enter 2 : To see CAMERAS table
Enter 3 : To see PROCESSORS table
Enter 4 : To see BATTERY table
Enter 5 : To see DISPLAYS table
Enter 6 : To Enter customer data
Enter 7 : To see IPHONE inventory
Enter 8: To see REDMI inventory
Enter 9: To see ONEPLUS inventory
Enter 10: User Authentication
Enter 11: To exit
30
Enter your choice : 3
+---------------+
(1, 'Helio G90T', 2000)
(2, 'Dimensity 1000x', 3000)
(3, 'SD 720G', 4000)
(4, 'Dimensity 1200', 5000)
(5, 'Helio G95', 8000)
(6, 'SD 765G', 9000)
(7, 'Apple Bionic A12', 12000)
(8, 'SD 888', 12000)
(9, 'SD 888+', 15000)
+---------------+
Go back to MENU
press 1
Enter Your Choice:1
MENU
Enter 1 : To see RAM_ROM table
Enter 2 : To see CAMERAS table
Enter 3 : To see PROCESSORS table
Enter 4 : To see BATTERY table
Enter 5 : To see DISPLAYS table
Enter 6 : To Enter customer data
31
Enter 7 : To see IPHONE inventory
Enter 8: To see REDMI inventory
Enter 9: To see ONEPLUS inventory
Enter 10: User Authentication
Enter 11: To exit
Enter your choice : 4
+---------------+
(1, '3999mAh', 599)
(2, '4000mAh', 999)
(3, '5000mAh', 1499)
(4, '6000mAh', 1999)
(5, '7000mAh', 2999)
+---------------+
Go back to MENU
press 1
Enter Your Choice:1
MENU
Enter 1 : To see RAM_ROM table
Enter 2 : To see CAMERAS table
Enter 3 : To see PROCESSORS table
Enter 4 : To see BATTERY table
Enter 5 : To see DISPLAYS table
32
Enter 6 : To Enter customer data
Enter 7 : To see IPHONE inventory
Enter 8: To see REDMI inventory
Enter 9: To see ONEPLUS inventory
Enter 10: User Authentication
Enter 11: To exit
Enter your choice : 5
+---------------+
(1, 'IPS LCD PANNEL', 2000)
(2, 'AMOLED panel', 5000)
(3, 'Liquis RETINA DISPLAY', 5500)
(4, 'super AMOLED panel', 6000)
(5, 'Super RETINA OLED DISPLAY', 8000)
+---------------+
Go back to MENU
press 1
Enter Your Choice:1
MENU
Enter 1 : To see RAM_ROM table
Enter 2 : To see CAMERAS table
Enter 3 : To see PROCESSORS table
Enter 4 : To see BATTERY table
33
Enter 5 : To see DISPLAYS table
Enter 6 : To Enter customer data
Enter 7 : To see IPHONE inventory
Enter 8: To see REDMI inventory
Enter 9: To see ONEPLUS inventory
Enter 10: User Authentication
Enter 11: To exit
Enter your choice : 7
+-----------------+
(1, 'ModelA', 50)
+-----------------+
(2, 'ModelB', 75)
+-----------------+
(3, 'ModelC', 100)
+-----------------+
Go back to MENU
Press 1
Enter Your Choice:1
MENU
Enter 1 : To see RAM_ROM table
Enter 2 : To see CAMERAS table
Enter 3 : To see PROCESSORS table
34
Enter 4 : To see BATTERY table
Enter 5 : To see DISPLAYS table
Enter 6 : To Enter customer data
Enter 7 : To see IPHONE inventory
Enter 8: To see REDMI inventory
Enter 9: To see ONEPLUS inventory
Enter 10: User Authentication
Enter 11: To exit
Enter your choice : 8
+-----------------+
(1, 'ModelX', 80)
(2, 'ModelY', 120)
(3, 'ModelZ', 150)
+-----------------+
Go back to MENU
Press 1
Enter Your Choice:1
MENU
Enter 1 : To see RAM_ROM table
Enter 2 : To see CAMERAS table
Enter 3 : To see PROCESSORS table
Enter 4 : To see BATTERY table
35
Enter 5 : To see DISPLAYS table
Enter 6 : To Enter customer data
Enter 7 : To see IPHONE inventory
Enter 8: To see REDMI inventory
Enter 9: To see ONEPLUS inventory
Enter 10: User Authentication
Enter 11: To exit
Enter your choice : 9
+-----------------+
(1, 'ModelOne', 60)
(2, 'ModelTwo', 90)
(3, 'ModelThree', 110)
+-----------------+
Go back to MENU
Press 1
Enter Your Choice:1
MENU
Enter 1 : To see RAM_ROM table
Enter 2 : To see CAMERAS table
Enter 3 : To see PROCESSORS table
Enter 4 : To see BATTERY table
Enter 5 : To see DISPLAYS table
36
Enter 6 : To Enter customer data
Enter 7 : To see IPHONE inventory
Enter 8: To see REDMI inventory
Enter 9: To see ONEPLUS inventory
Enter 10: User Authentication
Enter 11: To exit
Enter your choice : 6
User Authentication:
Enter your username: khush14
Enter your password: vbpsd
Authentication successful! Welcome, khush14
=========================================
====================
Enter Sno:-12
Enter your Name:-khush
Enter your Phone Number:-863586382
Enter Address:-dwarka
Enter Sno from RAM & ROM to choose:-8
Enter Sno from CAMERA to choose:-7
37
Enter Sno from PROCESSORS to choose:-9
Enter Sno from BATTERY to choose:-5
enter Sno from DISPLAYS to choose:-5
=========================================
====================
--------------------------------------------------------['12', 'khush',
'863586382', 'dwarka', '8GB &
256GB', '108MP', 'SD 888+', '7000mAh', 'Super
RETINA OLED DISPLAY']
+~~~~~~~~~~~~~~~~~~~~~~~~~+
|OUTSTANDING AMOUNT = Rs. 35499 |
+~~~~~~~~~~~~~~~~~~~~~~~~~+
Kindly Pay Your Bill
Thank You
--------------------------------------------------------Go Back To Menu
Press 1

38
39
40
41
42
BIBLIOGRAPHY
1. CLASS XII SUMIT ARORA
COMPUTER SCIENCE WITH
PYTHON
2. CBSEPYTHON.IN
3.YOTUBE

43

You might also like