0% found this document useful (0 votes)
13 views41 pages

CS Project

The document is a project report for an online sports software titled 'XTreme Sports' submitted by Aditya Sharma for the CBSE 2026 Examination as part of the Computer Science course. It includes details on system implementation, hardware and software used, Python coding, and various functionalities such as product management, order placement, and returns. The project aims to provide a user-friendly platform for purchasing extreme sports equipment and accessories online.

Uploaded by

adityanavika30
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)
13 views41 pages

CS Project

The document is a project report for an online sports software titled 'XTreme Sports' submitted by Aditya Sharma for the CBSE 2026 Examination as part of the Computer Science course. It includes details on system implementation, hardware and software used, Python coding, and various functionalities such as product management, order placement, and returns. The project aims to provide a user-friendly platform for purchasing extreme sports equipment and accessories online.

Uploaded by

adityanavika30
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

ST JOSEPH [Link].

SCHOOL
PURANPUR

SESSION 2025-26

A Project Report on
ONLINE SPORTS SOFTWARE

For
CBSE 2026 Examination
[As a part of the Computer Science Course (083)]

SUBMITTED BY : SUBMITTED TO:

Aditya Sharma Mr. Karaj Singh


Class- XII Science Computer Science
Roll no - 03
CERTIFICATE

THIS IS TO CERTIFY THAT Aditya Sharma STUDYING IN CLASS XII Science, HAS

SATISFACTORILY COMPLETED PROJECT WITH THE TITLE ONLINE SPORTS

SOFTWARE UNDER THE GUIDANCE OF Mr. Karaj Singh, (COMPUTER SCIENCE)

DURING THE ACADEMIC YEAR 2025-26 IN PARTIAL FULFILLMENT

OF “COMPUTER SCIENCE” PRACTICAL EXAMINATION OF

CENTRAL BOARD OF SECONDARY EXAMINATION (CBSE)

___________
______________ Internal Examiner
External Examiner

___________
PRINCIPAL
ACKNOWLEDGEMENT

I would like to express my special thanks of gratitude to my teacher Mr. Karaj

Singh who gave me the golden opportunity to do this wonderful project, Which

Also help me in doing a lot of research and I came to know about so many new
Things. I am really thankful to him Secondly I would also like to thank my parents
And friends who helped me a lot in fishing this project wiothin the limited time.

Name : Aditya Sharma


Sign:

Class : XII Science


❖ Python is a high-level language. It is a free and open-source language.

❖ It is an interpreted language, as Python programs are executed by an


interpreter.

❖ Python programs are easy to understand as they have a clearly


defined syntax and relatively simple structure.

❖ Python is case-sensitive. For example, NUMBER and number are not


same in Python.

❖ Python is portable and platform independent, means it can run on


various operating systems and hardware platforms.

❖ Python has a rich library of predefined functions.

❖ Python is also helpful in web development. Many popular web


services and applications are built using Python.

❖ Python uses indentation for blocks and nested blocks.


CONTENTS

1. System Implementation

1.1 The Hardware used:

1.2 The Software’s used:

2. Introduction

3. System Design & Development

3.1 Python Coding


3.2 Database
3.3 Output Screen

4. References
System Implementation

Hardware used:
While developing the software, the used hardware’s are:
PC with Intel Core i3 processor having 4.00 GB RAM and
other required devices.

Software used:
⮚ Microsoft Windows® 10 as Operating System.

⮚ Python IDLE as Front-end Development environment.

⮚ CSV Files as Back-end for storing the data.

MS-Word 2010 for documentation


INTRODUCTION
AN ONLINE SPORTS SOFTWARE
(XTREME SPORTS)

Welcome to XTreme Sports, your one-stop shop for all your


extreme sports needs! Whether you're a seasoned pro or just
starting out, we have everything you need to get your
adrenaline pumping.

Our user-friendly website makes it easy to browse our


extensive inventory of sports equipment, clothing, and
accessories. With just a few clicks, you can find exactly what
you're looking for and have it delivered right to your
doorstep.

We're committed to providing our customers with the best


possible shopping experience. That's why we offer a wide
range of 1 payment options and a hassle-free return policy
PYTHON SOURCE CODE

import random
import [Link] as m

from tabulate import tabulate as ta

db=[Link](host="localhost",user="root",password="admin",database="xtreme")

if db.is_connected():

print("establishment successful")
else:
print("error")
co=[Link]()

def fo():
print('''___WELCOME TO XTREME SPORTZ___
HERE YOU WILL GET YOUR FAVOURITE SPORTS PRODUCTS
SO PLAY WITH A STYLE''')

try:
print("enter a number to prove you are not a robot")
cho=int(input("enter the num "))
custu()
except:
print(" OOPS! ENTER A NUMBER ONLY")

# custu()

#FOR ADMINISTRATOR
def ad_order():
lo=int(input('''ENTER THE FOLOWING CHOICES
ENTER 1 FOR ADDING ITEM
ENTER 2 FOR DELETING ITEM
ENTER 3 FOR RETURNING TO MAIN MENU
ENTER 4 FOR VIEWING ALL ITEM'''))

if lo==1:
additem()
elif lo==2:
delitem()
elif lo==3:
custu()
elif lo==4:
view_all_item()
elif lo==5:
p_order()
def additem():
# import [Link] as m
db=[Link](host="localhost",user="root",password="admin",database="xtreme")
co=[Link]()

pid=int(input("enter the product id"))


pname=input("enter the product name")
company=input("enter the company that produces product")
sport=input("enter the sport")
price=int(input("enter the price"))
size=input("enter the size")
[Link]("insert into product values({},'{}',{},'{}','{}',{})".format(pid,pname,company,sport,size))
[Link]()
nh=input(''' IF YOU WANT TO CONTINUE
TYPE YES
IF YOU DO NOT WANT
TYPE NO''')
if [Link]()=="yes":
additem()
else:

ad_order()

def delitem():
# import [Link] as m
db=[Link](host="localhost",user="root",password="admin",database="xtreme")
co=[Link]()
p_id=int(input("enter the product you want to delete"))
[Link]("delete from product where pid='{}'".format(p_id))
[Link]()
ph=input("if you want to continue-----type yes/no")
if ph=="yes":
delitem()

else:
ad_order()

def view_all_item():
# import [Link] as m
''' display all products available in store'''
db=[Link](host="localhost",user="root",password="admin",database="xtreme")
co=[Link]()
[Link]("select * from product")
vo=[Link]()
c=0
print(ta(vo,headers=["pid","Pname ","Company Name","Sports" ,"Price","Size"],tablefmt="psql"))

print(''' enter 1 to go into administrator order menu


enter 2 for going to order menu''')
nh=int(input("enter the choice: "))
if nh==1:
ad_order()
if nh==2:
order()
else:
print(" invalid choice")

#function to search for an product

def search_item():
# Database connection and cursor initialization
db = [Link](host="localhost", user="root", password="admin", database="xtreme")
co = [Link]()

try:
# Ask the user for the product name
pname = input("Enter the product name: ")
[Link]("SELECT * FROM product WHERE pname = '{}'".format(pname))
go = [Link]()

# If product(s) found, display them


if go:
for i in go:
print(i)
else:
print("No product found with that name.")

except:
print("Invalid product name.")
search_item() # Recursively call the function if there's an error

try:
# Ask the user for the company name (for further filtering)
company = input("Enter the company name of the product to search: ")
[Link]("SELECT * FROM product WHERE pname = '{}' AND company = '{}'".format(pname, company))
go1 = [Link]()

# If matching company found, display them


if go1:
for j in go1:
print("*****")
print(j)
continue
else:
print("No matching company found for this product.")

except:
print("Invalid company.")
search_item() # Recursively call the function if there's an error

print('''Choose size from:


LARGE
MEDIUM
SMALL
REGULAR''')

try:
# Define available sizes
s = ["large", "medium", "small", "regular"]
size = input("Enter the size of the product to search: ")

if [Link]() in s:
# Search for the product by name, company, and size
[Link]("SELECT * FROM product WHERE pname = '{}' AND company = '{}' AND size = '{}'".format(pname,
company, size))
re = [Link]()

# If a matching product is found, display it


if re:
print("*****")
print(re)
else:
print("No matching product found for the selected size.")
else:
print("Invalid size entered. Please choose from the available options.")

except:
print("Please enter a valid size.")

#handle all the orders by the order function


#we can place order for any selected product of choice

def p_order():

db=[Link](host="localhost",user="root",password="admin",database="xtreme")
co=[Link]()
# Establish a database connection
db = [Link](host="localhost", user="root", password="admin", database="xtreme")
co = [Link]()

print("------ Place Your Order ------")


try:
cust_id=int(input("enter customer id"))
product_id = int(input("Enter the Product ID: "))
customer_name = input("Enter your name: ")
address = input("Enter your delivery address: ")
quantity = int(input("Enter the quantity: "))

[Link]("SELECT pname, price, size, company FROM product WHERE pid = %s", (product_id,))
product = [Link]()

if product:
product_name, price_per_unit, size, company = product
total_price = quantity * price_per_unit

# order details for confirmation


print("\n------ Order Details ------")
print(f"Product Name: {product_name}")
print(f"Company: {company}")
print(f"Price per Unit: {price_per_unit}")
print(f"Selected Quantity: {quantity}")
print(f"Total Price: {total_price}")
print(f"Available Size: {size}")

# Confirm the size


selected_size = input("Enter your size: ")
if selected_size != size:
print("Selected size is not available. Please try again.")
return

# Confirm the order


confirm = input("Do you want to confirm this order? (yes/no): ").lower()
if confirm == "yes":
# a randomly delivery ID
delivery_id = [Link](100000, 999999)

# Insert order into the delivery table


[Link](
"INSERT INTO delivery (delivery_id,c_id,customer_name, product_name, company, total_price,address) "
"VALUES (%s, %s ,%s, %s, %s, %s, %s)",
(delivery_id, cust_id , customer_name, product_name, company, total_price,address))

[Link]()

# Step 5: Generate a bill if requested


print("\n*** YOUR ORDER IS PLACED SUCCESSFULLY ***")
generate_bill = input("Do you want the bill? (yes/no): ").lower()
if generate_bill == "yes":
print("\n------ Bill ------")
print(f"Product ID: {product_id}")
print(f"Product Name: {product_name}")
print(f"Company: {company}")
print(f"Price per Unit: {price_per_unit}")
print(f"Quantity: {quantity}")
print(f"Total Price: {total_price}")
print(f"Delivery Address: {address}")
print(f"Delivery ID: {delivery_id}")
else:
print("Order canceled.")
else:
print("Product not found. Please try again.")
except Exception as e:
print(f"An error occurred: {e}")
finally:
[Link]()

print(input("any key to continue: "))

#for canceing order


def p_cancel():
# import [Link] as m
db=[Link](host="localhost",user="root",password="admin",database="xtreme")
co=[Link]()
try:
print("Processing...")
print("opening yours order list...")
#display all orders
[Link]("select * from delivery")
orders=[Link]()
if not orders:
print("no orders found! ")
return
#displaying all orders in tabulated form
print(ta(orders,headers=["delivery ID","customer id","customer name","product
name","company","price","date","address"],tablefmt="grid"))
order_id=int(input("enter the id you want to cancel"))

[Link]("select * from deliver where order_id=%s",(order_id,))


order=[Link]()
if order:
confirm=input("ARE YOU SURE YOU WANT TO CANCEL THIS ORDER ?(yes/no) : ").lower()
if confirm=="yes":
[Link]("delete from delivery where order_id= %s ", (order_id,))

[Link]()
print("Order successfully canceled")
else:

print("cancellation aborted")
else:
print("invalid order id ! no such id found")
except Exception as e:
print(f"An error occurred : {e} ")
finally:

print("_____________")

print("enter 1- if you want to continue canceling another orders")


print("enter 2- if you want to check your orders")
print("enter 3- if you want to go for order menu")
print("_____________")

enter=int(input("Enter Number: " ))


if enter==1:
p_cancel()
elif enter==2:
[Link]("select * from delivery")
orders=[Link]()
print(ta(orders,headers=["delivery ID","customer id","customer name","product
name","company","price","date","address"],tablefmt="grid"))

elif enter==3:
order()
else:
print("invalid choice!")

print(input('''press any key to continue'''))

def return_deli():
db = [Link](host="localhost", user="root", password="admin", database="xtreme")
co = [Link]()
print("------ Return a Product ------")
try:
delivery_id = int(input("Enter your Delivery ID: "))
reason = input("Enter the reason for returning the product: ")
[Link]("SELECT customer_name, product_name, total_price, address FROM delivery WHERE delivery_id =
%s", (delivery_id,))
delivery = [Link]()
if delivery:
customer_name, product_name, total_price, address = delivery
# Display return details for confirmation
print("\n------ Return Details ------")
print(f"Customer Name: {customer_name}")
print(f"Product Name: {product_name}")
print(f"Total Price: {total_price}")
print(f"Delivery Address: {address}")
print(f"Reason for Return: {reason}")
# Step 3: Confirm the return
confirm = input("Do you want to confirm this return? (yes/no): ").lower()
if confirm == "yes":
# Insert return details into the returns table
[Link](
"INSERT INTO return (delivery_id, customer_name, product_name, total_price, address, reason) "
"VALUES (%s, %s, %s, %s, %s, %s)",
(delivery_id, customer_name, product_name, total_price, address, reason)
)
[Link]()

# Step 4: Notify successful return


print("\n** YOUR RETURN HAS BEEN PROCESSED SUCCESSFULLY **")
else:
print("Return canceled.")
else:
print("Invalid Delivery ID. Please try again.")
except Exception as e:
print(f"An error occurred: {e}")

def show_deliveryhist():

db=[Link](host="localhost",user="root",password="admin",database="xtreme")
co=[Link]()
print("__________")

print("product you have order till now")


try:
cust_id=int(input("enter the customer id : "))
[Link]("select * from delivery where c_id ={} ".format(cust_id))
f=[Link]()
if f:
print(ta(f,headers=["delivery ID ","c_id", " cust_name", " product
name","company","price","address"],tablefmt="grid"))
else:
print("no such orders found")
except Exception as e:
print(f"An error occurred: {e}")

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

def p_history():
db=[Link](host="localhost",user="root",password="admin",database="xtreme")
co=[Link]()
#to show all the purchases

try:
[Link]("select * from delivery")
p=[Link]()
if p:
print(ta(p,headers=["delivery ID ","c_id", " cust_name", " product
name","company","price","address"],tablefmt="grid"))
else:
print("no purchase history found")
except Exception as e:
print(f"An error occured : {e}")

#DELIVERY MENU
def delivery():
print("DELIVERY MENU")

print('''ENTER THE FOLOWING CHOICES


ENTER 1 FOR PLACING ORDER
ENTER 2 FOR CANCELLING ITEM
ENTER 3 FOR RETURNING ORDER
ENTER 4 FOR ORDER MENU''')
fi=int(input("enter the choices: "))
if fi==1:
p_order()
elif fi==2:
p_cancel
elif fi==3:
return_deli()
elif fi==4:
order()
else:
print("invalid options")
delivery()

#FOR ADMINISTRATOR
def ad_order():
print('''ENTER THE FOLOWING CHOICES
ENTER 1 FOR ADDING ITEM
ENTER 2 FOR DELETING ITEM
ENTER 3 VIEW ALL ITEMS
ENTER 4 FOR VIEWING PURCHASE HISTORY
ENTER 5 FOR RETURNING TO ORDER MENU
ENTER 6 FOR MAIN MENU''')
try:
lo=int(input("enter your choice :- "))

if lo==1:
additem()
elif lo==2:
delitem()
elif lo==3:
view_all_item()
elif lo==4:
p_history()
elif lo==5:
order()
elif lo==6:
custu()

except:
print("invalid option")
ad_order()

#FOR USER
def order():
while True:
print(''' WELOME TO ORDER MENU ''')
print('''ENTER THE FOLOWING CHOICES
ENTER 1 FOR VIEWING ALL ITEM
ENTER 2 FOR SEARCHING ITEM
ENTER 3 TO VIEW CURRENT DELIVERY HISTORY
ENTER 4 FOR MAIN MENU
ENTER 5 TO GO TO DELIVERY MENU
ENTER 6 FOR EXIT ''')
try:
ko=int(input("enter your choice :- "))
if ko==1:
view_all_item()
elif ko==2:
search_item()
elif ko==3:
show_deliveryhist()
elif ko==4:
custu()
elif ko==5:
delivery()
elif ko==6:
print("thank you")
break

except:
print("invalid option")
order()

def sign_up():
# import [Link] as m
db=[Link](host="localhost",user="root",password="admin",database="xtreme")
co=[Link]()
try:
cus_id=int(input("enter the customer id :- "))

name=input("enter your username:- ")


[Link]("select count(*) from customer where name='{}'".format(name))
o=[Link]()
if o[0]>0:
print("username already taken")
sign_up()
else:
f=input("enter your email:- ")
if f[0]!="@" and "." in f and [Link]("@")==1 and f[-1]!=".":
s = [Link](".")[-1]
for i in s:
if not [Link]():
pass
else:
print("Enter valid Email!!!!")
return
address=input("enter your address")
while True:
ph=input("enter your phone number: ")
if len(ph)==10:
print("is this your correct number or you want to change it? type yes or no ")
descision=input("enter your choice")
if [Link]()=="no":
break
else:
print("OOPS INVALID NUMBER")
c=3
flag=1
while flag:
otp=[Link](100000,999999)
while c>0:
print(otp)
print("we have sent you a 6-digit code on your registered mobile name ")
otp_c=int(input("enter the given otp: "))
if otp_c==otp:
print("you have registered successfully")
[Link]("insert into customer values({},'{}','{}','{}',{})".format(cus_id,name,f,address,ph) )

flag=flag-1
order()
[Link]()
break
else:
print("INVALID OTP TRY AGAIN")
c=c-1
if c==0:
c=3
print("we will resend you a new one")
break
except Exception as e:
print(f"An error occured: {e}")

#login
def log():
# import [Link] as m

db=[Link](host="localhost",user="root",password="admin",database="xtreme")
co=[Link]()
try:
w2=input("ENTER YOUR REGITERED NAME :- ")
ci=int(input("enter the customer id: - "))
[Link]("select name,cust_id from customer where name='{}' and cust_id ={}".format(w2,ci))
b=[Link]()
if b is not None:
print('''LOGIN SUCCESSFUL
WELCOME BACK''')
order()
[Link]()
else:
print("sorry we can not find your registered name")
except Exception as e:
print(f"An error occurre: {e}")

print("**********")
def admin_log():

ps=input("enter the password:- ")


if ps=="romanreigns":
print("password granted")
ad_order()
else:
print("wrong password")
custu()
print("**********")

#delete customer
def delcustdet():
db=[Link](host="localhost",user="root",password="admin",database="xtreme")
co=[Link]()
try:

cust_name=input("enter the customer name you want to delete")


[Link]("select * from customer where name='{}'".format(cust_name))
cp=[Link]()
if cp:
[Link]("delete from product where pname='{}'".format(cust_name))
[Link]()
else:
print("USERNAME NOT FOUND")
delcustdet()
nh=input(''' IF YOU WANT TO CONTINUE
TYPE 1
IF YOU DO NOT WANT
TYPE 2
TO EXIT TYPE ANYTHING''')

if int(nh)==1:
delcustdet()
elif int(nh)==2:
updatecus()
else:
print("thank you")

except Exception as e:
print(f"An error occured: {e}")
updatecus()

#update customer
def updatenamefromcus():
# import [Link] as m
db=[Link](host="localhost",user="root",password="admin",database="xtreme")
co=[Link]()
try:

old_name=input("enter the customer name you want to update : ")


cust_name=input("enter the new customer name : ")
if old_name==cust_name:
print("username already taken")
updatenamefromcus()
else:
[Link]("select * from customer where name='{}'".format(old_name))
cp=[Link]()
if cp:
[Link]("update customer set name='{}' where name='{}'".format(cust_name,old_name))
[Link]()
print("updated successfully")
else:
print("name not found")
updatecus()
print(''' IF YOU WANT TO CONTINUE
TYPE 1
IF YOU DO NOT WANT
TYPE 2

ENTER ANYTHING TO STOP''')


nh=input("enter choice")

if int(nh)==1:
updatenamefromcus()
elif int(nh)==2:
updatecus()
else:
print("thank you")

except Exception as e:
print(f"An error occured: {e}")
updatenamefromcus()

def updateaddress():
db=[Link](host="localhost",user="root",password="admin",database="xtreme")
co=[Link]()
try:
new_add=input("enter new address ")
cust_name=input("enter the customer name")
[Link]("select count(*) from customer where name='{}'".format(cust_name))
cp=[Link]()
if cp[0]==0:
print("no usernamefound")
updatecus()
else:
[Link]("update customer set address='{}' where name='{}'".format(new_add,cust_name))
print("updated successfully")
[Link]()

print(''' IF YOU WANT TO CONTINUE


TYPE 1
IF YOU DO NOT WANT
TYPE 2
ENTER ANYTHING TO STOP''')
nh=input("enter choice :")

if int(nh)==1:
updateaddress()
elif int(nh)==2:
updatecus()
else:
print("thank you")

except Exception as e:
print(f"An error occured: {e}")
updatecus()
def updatephonenum():
db=[Link](host="localhost",user="root",password="admin",database="xtreme")
co=[Link]()
try:
cus_id=input("enter the customer you want to update")
ph_no=int(input("enter the phone number"))

[Link]("select count(*) from customer where name='{}'".format(cus_id))


cp=[Link]()
if cp[0]==0:
print("no usernamefound")
updatecus()
else:

[Link]("update customer set phone={} where name='{}'".format(ph_no,cus_id))

[Link]()
print("phone number updated successfully")
print(''' IF YOU WANT TO CONTINUE
TYPE 1
IF YOU DO NOT WANT
TYPE 2
ENTER ANYTHING TO STOP''')
nh=input("enter choice: ")

if int(nh)==1:
updatecus()
elif int(nh)==2:
updatephonenum()
else:
print("thank you")

except Exception as e:
print(f"An error occured: {e}")
updatephonenum()

def updatecus():
print('''ENTER THE FOLOWING CHOICES

ENTER 1 FOR UPDATING NAME FROM CUSTOMER


ENTER 2 FOR UPDATING ADDRESS
ENTER 3 FOR UPDATING PHONE NUMBER
ENTER 4 FOR THANK YOU
''')
try:
f=int(input("enter your choice: "))
if f==1:
updatenamefromcus()
if f==2:
updateaddress()
if f==3:
updatephonenum()
if f==4:
print("thank you")
custu()
except:
print("invalid choice")

print("--------------------------------")
def custu():

db=[Link](host="localhost",user="root",password="admin",database="xtreme")
co=[Link]()
while True:
print('''MAIN_MENU
ENTER 0 FOR EXIT
ENTER 1 FOR SIGN UP
ENTER 2 FOR ADMIN LOGIN
ENTER 3 TO DELETE CUSTOMER DETAILS
ENTER 4 UPDATE CUSTOMER
ENTER 5 FOR USER LOGIN
''')
try:
cho=int(input("enter your choice"))
if cho==1:
sign_up()
elif cho==2:
admin_log()
elif cho==5:
log()
elif cho==3:
delcustdet()
elif cho==4:
updatecus()
elif cho==0:
print("Thank You For Visiting Our Shop!!!!")
break

except:
print("invalid choice")
fo()
➢ Program outputs
Main menu

Admin Menu

Sign up
Log in

Update table
Order menu

Search item

Delivery history of an user


Delivery menu

Placing order

Returning an order
Thank you

Database

Customer table
Delivery table
Product table

Returns table
References

In order to work on this project titled –(ONLINE SPORTS


SOFTWARE), the following books and websites are
referred by me during the various phases of
development of the project.

1) Computer Science (Sumita arora Class XI and XII)


2) [Link]
3) [Link]

Other than the above-mentioned books, the suggestions


and supervision of my teacher and my class experience
also helped me to develop this software project.

You might also like