Maxfort School Rohini: Project On Movie Ticket Booking
Maxfort School Rohini: Project On Movie Ticket Booking
Maxfort School Rohini: Project On Movie Ticket Booking
ROLL NO :
CLASS : XII
1
CERTIFICATE
Ms Pinky Gupta
(PGT Comp Sc)
Examiner:
Name: _______________________
Signature:
2
ACKNOWLEDGEMENT
3
TABLE OF CONTENTS [ T O C ]
PAGE
SNo DESCRIPTION
NO
01 INTRODUCTION 05
03 EXISTING SYSTEM 07
04 PROPOSED SYSTEM 07
DESCRIPTION OF INPUT/OUTPUT
05 08
REQUIREMENTS
06 FLOW CHART 09
07 SOURCE CODE 10
08 OUTPUT 12
09 FUTURE SCOPE 15
10 CONCLUSION 15
12 BIBLIOGRAPHY 16
4
INTRODUCTION
● This project is aimed at developing a ticket reservation
system for Cinema Halls. The Ticket Reservation
System is an Internet based application that can be
accessed throughout the internet and can be accessed by
anyone having internet connection.
● Hence both the customer and the cinema can sort out
further matter.
5
OBJECTIVE
6
EXISTING SYSTEM
The existing system of offline booking have following
problems-
▪ More man power
▪ Time consuming
PROPOSED SYSTEM
● It works on the basic principle of the linking python and a
database .
● At first , the command will be given in python software
afterwards the command will be sent to the database.
● There in the database the command will fetch the
demanded data and it will pass it to the python software.
● Then the required output will be shown the python
software.
● After succesful booking, data generated will be stored in
the database.
7
Hardware / Software Used
8
TABLE STRUCTURE USED
This table contains the data of all customers having an account at the
cinema.
This table contains the data of all the movies that have been stored in the
database by the cinema.
This table contains all the offers that can be applied at the time of payment.
This table stores the data of all customers who have booked tickets.
9
FLOWCHART
Start
Input Audi No
Give feedback
10
SOURCE CODE
#CONNECTING MYSQL
import mysql.connector as mys
mycon=mys.connect(host='localhost',user='root',passwd='Astrophysicist0116@T',database='
MTB')
mycursor=mycon.cursor()
#WELCOME
print("==============================================================
==================")
print(" Welcome To ALPHAION CINEMA HALL Ticket Booking Service ")
print("==============================================================
==================")
print('\n')
#SIGN-IN/SIGN-UP
print("PLEASE SELECT ONE OF THE FOLLOWING OPTIONS")
print("1. Sign In")
print("2. Sign Up")
print("3. Continue Without Login")
print("4. Exit")
print('\n')
xy=int(input("Please enter your choice:"))
while xy==1 or xy==2 or xy==3 or xy==4:
if (xy==1):
#INPUT PHONE NO. AND PASSWORD
phn=input("enter Phone number:")
pasw=input("enter password:")
#FETCHING DATA FROM SQL TABLE
query1="select * from UPT where pasw='{pasw}' and
Phno={phn}".format(pasw=pasw,phn=phn)
mycursor.execute(query1)
data=mycursor.fetchone()
#CONFIRMING IF USER EXSISTS
if data!=None:
print("Hii",data[0])
email=data[0][3]
print("Which movie would you like to watch")
print('\n')
#FETCHING LIST OF MOVIES
query2="select * from MSA"
mycursor.execute(query2)
data2=mycursor.fetchall()
SNo=1
#PRINTING LIST OF MOVIES
for row in data2:
print(SNo)
print("Movie:",row[0])
11
print("Price:",row[1])
print("Audi:",row[2])
print('\n')
SNo=SNo+1
ans='n'
while(ans!='y'):
#ASKING MOVIE TO BE WATCHED
MovC=int(input("enter your choice(ENTER AUDI NO.):"))
#FETCHING DATA REGARDING MOVIE SELECTED
query3="select * from MSA where audino={MovC}".format(MovC=MovC)
mycursor.execute(query3)
data3=mycursor.fetchall()
print(data3)
print("Confirm movie",data3[0][0])
x=data3[0][1]
ans=input(":")
#SELECT MOVIE TIMINGS
print("SHOWTIMINGS")
queryX="select* from ST"
mycursor.execute(queryX)
dataX=mycursor.fetchall()
12
mycursor.execute(query4)
data4=mycursor.fetchall()
for row in data4:
print("SNo.:",row[0])
print("Offer:",row[1])
print("Discount:",row[2])
print('\n')
ans2='r'
while ans2=='r':
Off=int(input("Enter offer number:"))
query7="select * from Offer"
mycursor.execute(query7)
data10=mycursor.fetchall()
#CHECKING IF OFFER VALIDITY
l=0
for row in data10:
l=l+1
if(Off>l):
print("out of range")
ans2='r'
elif (Off==1):
query5="select * from BH where Phn={phn}".format(phn=phn)
mycursor.execute(query5)
data5=mycursor.fetchall()
print(data5)
if data5!=[]:
print("can't avail this offer")
ans2=input("Reapply((enter 'r':")
else:
print("Discount applied")
ans2='y'
else:
print("Discount applied")
ans2='y'
13
Ticketprice=(int(TP))*(int(Seat))
#Totalcost=Ticketprice-Discount+taxes
Totalcost=(float(Ticketprice))*1.18-float(discount)
print("Amount Payable:Rs.",Totalcost)
payment=0
#PAYMENT
while payment!=Totalcost:
payment=float(input("enter amount to pay:"))
if payment!=Totalcost:
print("amount doesnot match")
print("try again")
nouse=input("press any letter to continue")
#PRINTING TICKET
print("Ticket!!!")
print("==============================================================
==================")
print("Movie:",data3[0][0])
print("Showtime:",dataX2[0][1])
print("Audi:",data3[0][2])
print("Seats:",Seat)
print('\n')
print("Amount:",Totalcost)
print("Discount:",discount)
print("Payment status:payed")
print("==============================================================
==================")
print("THANKS FOR BOOKING")
print("TICKET HAS BEEN SEND TO REGISTERED PHONE NO. AND
EMAIL ID")
feed=input("enter feedbacks if any")
#UPDATING DATA IN DATABASE FOR LATER USES
query10="insert into BH
values('{0}','{1}','{2}','{3}')".format(phn,pasw,email,data3[0][0])
mycursor.execute(query10)
mycon.commit()
xy=10
else:
#IF PHONE NO. OR PASW DIDN'T MATCHED,
print("no data found, choose again")
print("1. Sign In")
print("2. Sign Up")
print("3. Continue Without Login")
xy=int(input("Please enter your choice:"))
14
elif(xy==2):
h='t'
while h=='t':
#GETTING DETAILS TO SIGNING UP
name=input("Enter your Name:")
Phone=input("Enter your Number:")
Email=input("Enter your mail id:")
CP='q'
CoP='r'
while CP!=CoP:
#GETTING A VALID PASSWORD
CP=input("Create Password:")
while len(CP)<4:
print("password must be of atleast 4 letters")
CP=input("Create Password:")
CoP=input("Confirm Password:")
if CP!=CoP:
print("Password doesn't match, retry")
query11="select * from upt"
mycursor.execute(query11)
data12=mycursor.fetchall()
for row in data12:
if row==(name,CP,Phone,Email):
print("already exsist")
print("retry")
else:
#UPDATING GIVEN INFORMATION IN DATABASE
query9="insert into upt
values('{0}','{1}','{2}','{3}')".format(name,CP,Phone,Email)
mycursor.execute(query9)
mycon.commit()
h='y'
#GIVING OPTIONS TO SIGN IN
print("1. Sign In")
print("2. Sign Up")
print("3. Continue Without Login")
print("4. EXIT")
xy=int(input("Please enter your choice:"))
elif(xy==3):
#FETCHING AND PRINTING LIST OF MOVIES
query8="select * from MSA"
mycursor.execute(query8)
data11=mycursor.fetchall()
SNo=1
for row in data11:
print(SNo)
print("Movie:",row[0])
print("Price:",row[1])
15
print("Audi:",row[2])
print('\n')
SNo=SNo+1
print("TO PROCEED FURTHUR PLEASE SIGN IN OR SIGN UP")
print("1. Sign In")
print("2. Sign Up")
print("3. Continue Without Login")
print("4. EXIT")
xy=int(input("Please enter your choice:"))
else:
#EXITING PROGRAM
print("BYE")
xy=10
16
OUTPUT:
>>>
= RESTART:
C:\Users\ADMIN\AppData\Local\Programs\Python\Python39
\Tanmay Vijay MTB.py
============================================
====================================
Welcome To ALPHAION CINEMA HALL Ticket
Booking Service
============================================
====================================
2
Movie: Eternals
Price: 250
Audi: 2
17
3
Movie: RRR(3D)
Price: 250
Audi: 3
4
Movie: 83
Price: 275
Audi: 4
5
Movie: Sooryavanshi
Price: 225
Audi: 5
1
Movie: Spiderman:Nowayhome
Price: 300
Audi: 1
2
Movie: Eternals
Price: 250
Audi: 2
3
Movie: RRR(3D)
Price: 250
Audi: 3
19
4
Movie: 83
Price: 275
Audi: 4
5
Movie: Sooryavanshi
Price: 225
Audi: 5
SNo.: 2
Offer: NYEAR022
Discount: 100
SNo.: 3
Offer: XMAS22
Discount: 100
21
Amount: 4148.0
Discount: 100
Payment status:payed
============================================
====================================
THANKS FOR BOOKING
TICKET HAS BEEN SEND TO REGISTERED PHONE NO.
AND EMAIL ID
enter feedbacks if any-
>>>
22
Future Scope
To develop this system further, it is suggested to add the
following features –
Conclusion
In this project we were able to successfully automate the
following–
23
BIBLIOGRAPHY
24