Class 12 CS Project
Class 12 CS Project
SCIENCE
CONNECTIVITY
BASED PROJECT
TOURS AND
TRAVELS
AGENCY
XII-A
Kritika Sharma
Anisha Sharma
INDEX
1. Certificate
2. Acknowledgement
3. Introduction to Python
4. Introduction to Mysql
5. Hardware and Software
Specifications for the project
6. Database and table structure
7. Python Coding
8. Input and Output (Python)
9. Bibliography
CERTIFICATE
DEEPAK KAKWANI
COMPUTER SCIENCE
DATE-
ACKNOWLEDGEMENT
We take this opportunity to express our heartfelt gratitude to everyone who
contributed to the successful completion of this project.
First and foremost, we would like to extend our deepest appreciation to
Deepak Kakwani, who provided us with valuable guidance and unwavering
support throughout this project. Their insights and expertise have been
invaluable, and we are grateful for the time and effort they invested in
helping us refine our ideas and improve our work. Without their assistance,
this project would not have reached its current level of success.
We also extend our gratitude to Indraprastha Global School for providing us
with the resources and facilities that were essential to the completion of this
work. The conducive environment and support from the staff allowed us to
carry out our project efficiently.
We would like to sincerely thank our colleagues and peers for their
constructive feedback and assistance during various stages of the project.
Their input helped us identify areas for improvement and inspired us to
strive for higher standards. The healthy exchange of ideas and discussions
we shared were instrumental in shaping this project.
A special thank you goes to our family members, who have been our pillars
of strength throughout this journey. Their constant encouragement,
patience, and understanding allowed us to focus on our work without
distraction. They stood by us during the challenges and celebrated our
achievements, and for that, we are eternally grateful.
Last but not least, we would like to thank each other for the unwavering
teamwork, trust, and dedication shown throughout the project. We have
faced numerous challenges together, but our mutual support and
collaboration enabled us to overcome them and complete this project
successfully. This experience has not only enhanced our knowledge and
skills but also strengthened our bond as partners in this endeavor.
Thank you once again to everyone who has been part of this journey.
Sincerely,
Anisha Sharma
Kritika Sharma
INTRODUCTION TO PYTHON
2)Script Mode
PYTHON FUNDAMENTALS
1)TOKENS
Smallest individual unit in program is called token.
a)Key words
The special words having special meaning reserved by
programming language.
b)Identifiers
They are the fundamental building blocks of programming
language for giving names to different parts of program.
DATA TYPES
Numbers Sequence
FLOW OF CONTROL
i)Sequence
In this, program follows top to bottom approach and each line of
program will be executed.
ii)Selection
In this the statements of program are executed depending upon
particular condition. Only one part of the expression will be
executed on the basis of particular condition.
iii)Iteration
It means repetition of statements certain number of times
depending upon particular condition. In general, iteration is
known as looping. Python supports two iteration statements i.e.
for statement and while statement.
INTRODUCTION TO MYSQL
MySQL is a Database Management
System (DBMS) that uses Structured Query
Language (SQL).
SQL is the most popular language for adding,
accessing and managing, manipulating MySQL is
a Database Management System (DBMS) that
uses Structured Query Language (SQL).
SQL is the most popular language for adding,
accessing and managing content in a database.
It is used to collect or manipulate the data in the
form of tables which is collection of rows and
columns.
MYSQL
a command-based software
DDL DML
Data Definition Language Data Manipulation Language
(DDL) (DML)
These commands only These commands only
manipulate the structure manipulate the data present
of the table. in the table.
The commands are: - The commands are: -
Create Insert
Alter Select
Drop Update
Delete
SOFTWARE REQUIREMENTS
Windows OS
Python 3
MySQL connector module
LIBRARIES USED
Mysql.connector
Colorama
Tabulate
Termcolor
if cars==1:
mon=8000
elif cars==2:
mon=10000
elif cars==3:
mon=10600
elif cras==4:
mon=1000
elif cars==5:
mon=13000
else:
print("wrong input")
elif rt==2:
transport="bus"
print(Fore.BLUE + "")
print("1. mini")
print("2. deluxe")
bus=int(input("enter your choice"))
if bus==1:
mon=15000
transport="by road(mini bus)"
elif bus==2:
mon=20000
transport="by road(deluxe bus)"
print(Fore.YELLOW + "")
tg=input("do you need a tour guide? (8,000 per day):")
print(Fore.WHITE + "")
print("AVAILABLE HOTELS")
print("1:3 star")
print("2:5 star")
print("3:7 star")
hotm=0
hot=0
print(Fore.WHITE + "")
while hot!=1 or hot!=2 or hot!=3:
hot=int(input("choose among 1,2,3:"))
if hot==1:
hotm=4000
break
elif hot==2:
hotm=7000
break
elif hot==3:
hotm=10000
break
else:
print("wrong input")
hotmt=hotm*time
mycursor.execute("select * from customer2bz ")
data=mycursor. fetchall()
for i in data:
if i[0]>lst:
lst=i[0]
lst=lst+1
print("YOUR REFRENCE CODE IS - ",lst)
print(Fore.RESET + "")
print("***************************************************************************")
print("***************************************************************************")
print( " TOUR AND TRAVELS")
else:
tgm=0
print(Fore.CYAN+"hotel charges:" , hotmt)
if mon==0:
print(Fore.CYAN+"TRANSPORTATION CHARGES: will be according to tickets")
else:
print(Fore.CYAN+"TRANSPORTATION CHARGES:",mon)
sum=hotmt+mon+tgm
half1= sum/2
print(Fore.WHITE + "")
print("TOTAL MONEY:",sum)
print("PAID:",half1)
print("DUE:",half1)
print(Fore.CYAN +"REFERENCE CODE NUMBER:", lst)
print(Back.BLACK + "")
print(Fore.RESET + "")
print("***************************************************************************")
print("***************************************************************************")
r=(lst,name,ph,initial,final, time, transport, m , num)
add1="insert into customer2bz(rno,ccname,phoneno,pickuplocation,wheretolocation, tenure,
modeoftransportation ,modeofpayment, numberoftravellers) values (%s,%s,%s,%s,%s,%s, %s , %s, %s)"
mycursor.execute(add1,r)
mydb.commit()
elif a==2:
print(Fore.WHITE + "")
if doubt=="name":
new1=input("enter Required name -")
u1="update customer2bz set ccname= %s where rno = %s"
mycursor.execute(u1,(new1,rno1))
print("Name updated!!!")
mydb.commit()
elif doubt=="phone number":
new1=input("enter Required PHONE NUMBER-")
u1="update customer2bz set phoneno= %s where rno= %s"
mycursor.execute(u1,(new1,rno1))
print("Phone number updated!!!")
mydb.commit()
elif doubt=="address":
new1=input("enter Requried ADDRESS -")
u1="update customer2bz set pickuploation= %s where rno= %s"
mycursor.execute(u1,(new1,rno))
print("Address updated!!!")
mydb.commit()
elif doubt=="destination":
new1=input("enter Required DESTINATION-")
u1="update customer2bz set wheretolocation= %s where rno= %s"
mycursor.execute(u1,(new1,rno1))
print("Destination updated!!!")
mydb.commit()
elif doubt=="tenure":
new1=input("enter the new modified tenure-")
u1 ="update customer2bz set tenure= %s where rno= %s"
mycursor.execute(u1,(new1,rno1))
print("Tenure updated!!!")
mydb.commit()
elif doubt=="number of people":
new1=input("enter the new modified number of people-")
u1="update customer2bz set numberoftravellers= %s where rno= %s"
mycursor.execute(u1,(new1,rno1))
print("Number of people updated!!!")
mydb.commit()
else:
print("there must be a grammatical error or space issue. If you still want to modify details then
continue.")
print(Style.RESET_ALL)
elif a==3:
print(Fore.WHITE + "")
number=int(input("enter your Refrence code "))
query="delete from customer2bz where rno= '%s '" %(number)
print("Record deleted!!!")
mycursor.execute(query)
mydb.commit()
else:
print("Wrong input!!! Press 'y' to go again")
ch=input("DO YOU WANT TO CONTINUE - ")
Before execution
After program execution
MODIFICATION OF RECORD
Before execution
After execution
DELETING RECORD
Before execution
After execution
BIBLIOGRAPHY
2. Website: https://www.w3resource.com
3.http://python.mykvs.in/presentation/presentation2021/class%20xii/
computer%20science/Interface%20python%20with%20sql
%20database.pdf