Class 12 CS Project
Class 12 CS Project
SCIENCE
CONNECTIVITY
BASED PROJECT
TOPIC-TOURS AND
TRAVELS AGENCY
Name-Srishti Gupta
Class- XII-A
Group member names-
Sumegha Gupta
Isha Shankh
INDEX
S.NO. TOPIC
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
NITIN GUPTA
DATE-
ACKNOWLEDGEMENT
“I would like to express my thanks to the people who
have helped me most throughout my project. I am
grateful to my teacher Mr.Nitin Gupta for nonstop
support for the project. A special thank of mine goes
to my group members who helped me out in
completing the project, where they all exchanged
their own interesting ideas, thoughts and made this
possible to complete my project with all accurate
information. I wish to thank my parents for their
personal support or attention who inspired me to go
my own way.
INTRODUCTION TO PYTHON
Python is a widely used general-purpose, high level programming language. It was created by
Guido van Rossum in 1991. Python is a programming language that lets you work quickly and its
syntax allows programmers to express their concepts in fewer lines of code.
Python works in two different mode:
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.
DDL DML
Data Definition Language Data Manipulation Language
(DDL) (DML)
These commands only These commands only
manipulate the structure of manipulate the data present
the table. in the table.
The commands are:- The commands are:-
Create Insert
Alter Select
Drop Update
Delete
HARDWARE AND SOFTWARE
SPECIFICATIONS
HARDWARE SPECIFICATIONS:
CPU: Intel Core or Xeon 3GHz (or Dual Core 2GHz) or equal AMD CPU.
Cores: Single (Dual/Quad Core is recommended)
RAM: 4GB (6GB recommended)
Graphic Accelerators: nVidia or ATI with support of OpenGL 1.5 or higher.
Display Resolution: 1280x1024 is recommended, 1024x768 is minimum.
SOFTWARE REQUIREMENTS:
Windows OS
Python 3
MySQL connector module
LIBRARIES USED
Mysql.connector
Colorama
Tabulate
Termcolor
Database used: csproject
Table structure:
PYTHON CODING
print("CONNECTIVITY BASED PROGRAM")
print("TRAVEL AGENCY")
print("BY")
print("ISHA SHANKH --- 12A")
print("SRISHTI GUPTA --- 12A")
print("SUMEGHA GUPTA --- 12A")
print()
print()
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 - ")
INSERTING DATA WITH BILL GENERATION
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