Professional Documents
Culture Documents
BANNERGHATTA, BENGALURU
XII AISSCE
COMPUTER PROJECT
MOVIE TICKET BOOKING
This is to certify that this bonafide project work "Movie Ticket Booking " in the
Class XII A in the academic year 2022-2023 and is submitted for the AISSCE
Bangalore.
_______________ ________________
School Principal Teacher Incharge
_______________
External Examiner
1
ACKNOWLEDGMENT
We would like to express our greatest gratitude to the people who have
helped and supported us through this project. We are grateful to our teacher
Mrs. Lisha for her continuous support for the project, from initial advice and
contacts in the early stages of conceptual inception and through ongoing
advice and encouragement of this day.
We also express our thanks to the principal Mrs. Jeelu Anup for providing all
facilities to use the school resources.
We wish to thank our parents for their undivided support. At last but not least
we want to thank our friends who appreciated us for our work and motivated
us and finally to God who made all the things possible….
2
PROJECT ON
3
INTRODUCTION
Movie theaters have become one of the most preferred getaways in today's
world. And yet going to the theater, selecting a movie, and making sure the
tickets aren't sold out, could prove tedious. Any knowledge about the list of
movies, show timings, or even seats can be attained by the customer only by
being present physically.
An Online Movie Ticketing System brings the theaters closer to the
customers. It eases and improves the booking experience The system holds
the database of the movies being played along with their show timings and
available seats. It focuses on the capabilities and facilities provided by a
theater.
4
OBJECTIVE OF THE PROJECT
The objective of this project is to let the students apply the programming
knowledge into a real-world situation/problem and expose the students how
programming skills helps in developing a good software.
5
PROPOSED SYSTEM
Today one cannot afford to rely on the fallible human beings who really want
to stand against today’s merciless competition where not too wise saying “to
err is human” is no longer valid, it’s outdated to rationalize your mistake. So,
to keep pace with time, to bring about the best result without malfunctioning
and greater efficiency so to replace the unending heaps of flies with a much
sophisticated hard disk of the computer.
One has to use the data management software. Software has been an
ascent in atomization in various organizations. Many software products
working are now in markets, which have helped in making the organizations
work easier and efficiently. Data management initially had to maintain a lot of
ledgers and a lot of paperwork had to be done but now software products in
this organization have made their work faster and easier. Now only this
software has to be loaded on the computer and work can be done.
This prevents a lot of time and money. The work becomes fully automated
and any information regarding the organization can be obtained by clicking
the button. Moreover, now it’s an age of computers and automating such an
organization gives a better look.
6
SYSTEM DEVELOPMENT LIFE
CYCLE(SDLC)
INITIATION PHASE:
The Initiation Phase begins when a business sponsor identifies a need or an
opportunity.
PLANNING PHASE:
The planning phase is the most critical step in completing development, acquisition, and
maintenance projects. Careful planning, particularly in the early stages of a project, is
necessary to coordinate activities and manage project risks effectively.
DESIGN PHASE:
The design phase involves converting the informational, functional, and network
requirements identified during the initiation and planning phases into unified design
specifications that developers use to script programs during the development phase.
DEVELOPMENT PHASE:
The development phase involves converting design specifications into executable
programs. Effective development standards include requirements that programmers and
other project participants discuss design specifications before programming begins.
8
INTEGRATION AND TEST PHASE:
Subsystem integration, system, security, and user acceptance testing is conducted
during the integration and test phase. The user, with those responsible for quality
assurance, validates that the functional requirements, as defined in the functional
requirements document, are satisfied by the developed or modified system.
IMPLEMENTATION PHASE:
This phase is initiated after the system has been tested and accepted by the user. In this
phase, the system is installed to support the intended business functions.
9
PYTHON
Python is a programming language that lets you work more quickly and
integrate your systems more effectively. Python is developed under an
OSI-approved open source license, making it freely usable and distributable,
even for commercial use. Python's license is administered by the Python
Software Foundation.
Python offers many choices for web development: Frameworks such as
Django and Pyramid. Micro-frameworks such as Flask and Bottle. Advanced
content management systems such as Plone and Django CMS. Python is a
superb language for teaching programming, both at the introductory level
and in more advanced courses.
10
MySQL
● SQL, structured query language, was developed in 1970’s in an IBM
laboratory. SQL being nonprocedural describes what all data is to be
retrieved or inserted or modified or deleted, rather than specifying code
describing how to perform the entire operation.
11
TABLES USED
12
SOURCE CODE
import mysql.connector as mysql
import os
from dotenv import load_dotenv
import random
import time
import string
load_dotenv()
def startUp():
# Start MYSQL connection
PASSWORD = os.getenv('PASSWORD')
USER = os.getenv('USER')
DB = os.getenv('DATABASE')
cursor.execute("CREATE TABLE IF NOT EXISTS movies (id int, name VARCHAR(255), phone int,
email VARCHAR(255), count int)")
return cursor, connection
for i in range(10):
print(movieList[i])
choice = int(input("Enter your choice:"))
movieChosen = movieList[choice-1]
return movieChosen
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13
def Seats(): #to display the availability of seats(theater seats)
arrP = []
rowP,colmP = (3,10)
p=1
for i in range(rowP):
col = []
for j in range (colmP):
col.append(p)
p+=1
arrP.append(col)
print()
print("--------------------------------------------")
print("PRIME:Rs.550")
for i in range(-1,-len(arrP)-1,-1) :
print("|",arrP[i],"|")
print()
row,colm = (10,10)
a=1
for i in range(row):
col = []
for j in range(colm):
col.append(a)
a+=1
arr.append(col)
print("CLASSIC:Rs.250")
for i in range(-1,-len(arr)-1,-1) :
print("|",arr[i],"|")
print()
print()
print()
print(" ============SCREEN=====================")
choice = input("enter your choice, CLASSIC or PRIME:")
choice = choice.strip()
choice = choice.upper()
if choice == "PRIME":
print("~The Tickets have sold out, you can try to book your tickets in CLASSIC")
elif choice == "CLASSIC":
print("Let's choose the seats")
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def RangeOfTheSeat(seatNoX): # Extracts the seat index and sends it to Primary_array() function
if seatNoX in range(1,11): #index is in the range [0,9]
seatIndex = seatNoX-1
extList = [0]
extList.append(seatIndex)
a = int(extList[0])
b = int(extList[1])
Primary_array(a,b)
elif seatNoX in range(11,101): #Index is in the range [10,99]
seatIndex = str(seatNoX-1)
extList = list(seatIndex)
a = int(extList[0])
b = int(extList[1])
Primary_array(a,b)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14
def Sellect_seat(): # Seat selection module
print()
noOFseats = int(input("Enter the number of seats(can select max 5):"))
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if noOFseats == 1:
temp = int(input("Enter the seat number"))
seatNo.append(temp)
seatNo1 = int(seatNo[0])
RangeOfTheSeat(seatNo1)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
elif noOFseats == 2:
temp = eval(input("Enter the First Seat number:"))
seatNo.append(temp)
temp = eval(input("Enter the Second Seat number:"))
seatNo.append(temp)
seatNo1 = seatNo[0]
seatNo2 = seatNo[1]
RangeOfTheSeat(seatNo1)
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
RangeOfTheSeat(seatNo2)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
elif noOFseats == 3:
temp = eval(input("Enter the First Seat number:"))
seatNo.append(temp)
temp = eval(input("Enter the Second Seat number:"))
seatNo.append(temp)
temp = eval(input("Enter the Third Seat number:"))
seatNo.append(temp)
seatNo1 = seatNo[0]
seatNo2 = seatNo[1]
seatNo3 = seatNo[2]
RangeOfTheSeat(seatNo1)
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
RangeOfTheSeat(seatNo2)
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
RangeOfTheSeat(seatNo3)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
elif noOFseats == 4:
temp = eval(input("Enter the First Seat number:"))
seatNo.append(temp)
temp = eval(input("Enter the Second Seat number:"))
seatNo.append(temp)
temp = eval(input("Enter the Third Seat number:"))
seatNo.append(temp)
temp = eval(input("Enter the Forth Seat number:"))
seatNo.append(temp)
seatNo1 = seatNo[0]
seatNo2 = seatNo[1]
seatNo3 = seatNo[2]
seatNo4 = seatNo[3]
RangeOfTheSeat(seatNo1)
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
RangeOfTheSeat(seatNo2)
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
RangeOfTheSeat(seatNo3)
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
RangeOfTheSeat(seatNo4)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 15
elif noOFseats == 5:
temp = eval(input("Enter the First Seat number:"))
seatNo.append(temp)
temp = eval(input("Enter the Second Seat number:"))
seatNo.append(temp)
temp = eval(input("Enter the Third Seat number:"))
seatNo.append(temp)
temp = eval(input("Enter the Forth Seat number:"))
seatNo.append(temp)
temp = eval(input("Enter the Fifth Seat number:"))
seatNo.append(temp)
seatNo1 = seatNo[0]
seatNo2 = seatNo[1]
seatNo3 = seatNo[2]
seatNo4 = seatNo[3]
seatNo5 = seatNo[4]
RangeOfTheSeat(seatNo1)
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
RangeOfTheSeat(seatNo2)
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
RangeOfTheSeat(seatNo3)
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
RangeOfTheSeat(seatNo4)
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
RangeOfTheSeat(seatNo5)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
elif noOFseats == 0:
print("you cannot select zero seats")
elif noOFseats>5:
print("~~Classic section has a seating capacity of only 100 people")
print("~~Enter 0 if u want to cancel ticket booking OR enter -1 if u want to restart the booking")
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16
def UserDetails(cursor, connection): #To accept the user details and store it in the database
name = input("Enter your name: ")
email = input("Enter your email: ")
phone = input("Enter your phone number: ")
count = 1
cursor.execute("SELECT * FROM movies WHERE email = %s", (email,))
data = cursor.fetchone()
if cursor.rowcount >= 1:
count = data[4] +1
cursor.execute("UPDATE movies SET count = %s WHERE email = %s", (count, email))
connection.commit()
else:
cursor.execute("INSERT INTO movies (id, name, email, phone,count) VALUES (%s, %s, %s, %s,
%s)", (random.randint(1000, 10000),name, email, phone,count))
connection.commit()
print("[+] Thank You for choosing us! Your ticket has been booked successfully.Please check your
email for a confirmation message.")
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if __name__ == "__main__":
arr = []
seatNo = []
print("~ WELCOME TO MOVIE TICKET BOOKING SERVICE ~")
print()
print("Here are the list of movies currently airing ~")
movie_Chosen = DisplayMovies()
MovieInfo(movie_Chosen)
print()
print("Do you wish to proceed ?")
print('\n')
print('If yes then enter "1"\nElse enter "0" to display the movie list again')
choice1 = int(input("Enter your choice: "))
if choice1 == 0:
movie_Chosen = DisplayMovies()
MovieInfo(movie_Chosen)
elif choice1 == 1:
print("Processing...")
else:
print("Invalid input")
print('\n')
print("Lets choose the theater of your choice")
theaterName = Theaters()
Seats()
Sellect_seat()
n_seates = len(seatNo)
Amount(n_seates)
orderID = Payment()
cursor , connection = startUp()
UserDetails(cursor, connection) # Get the user details and store them.
Tickets(orderID,theaterName,movie_Chosen) # Print the ticket
18
OUTPUT
19
HARDWARE AND SOFTWARE
REQUIREMENTS
● PROCESSOR : PENTIUM(ANY) OR
● RAM : 512MB+
20
BIBLIOGRAPHY
● www.geeksforgeeks.org
21