You are on page 1of 23

RYAN INTERNATIONAL SCHOOL

BANNERGHATTA, BENGALURU

XII AISSCE

ACADEMIC YEAR 2022-2023


REGISTRATION NUMBER: K/2/23/45607/0021

COMPUTER PROJECT
MOVIE TICKET BOOKING

SUBMITTED BY: SUBMITTED TO:


Adnan Nagdiwala LISHA ARAVIND
BONAFIDE CERTIFICATE

This is to certify that this bonafide project work "Movie Ticket Booking " in the

subject of Computer Science has been completed by Adnan Nagdiwala of

Class XII A in the academic year 2022-2023 and is submitted for the AISSCE

practical examination conducted by CBSE at Ryan International School,

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

MOVIE TICKET BOOKING

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.

1. Write programs utilizing modern software tools.

2. Apply object-oriented programming principles effectively when


developing small to medium sized projects.

3. Write effective procedural code to solve small to medium sized


problems.

4. Students will demonstrate a breadth of knowledge in computer science,


as exemplified in the areas of systems, theory and software
development.

5. Students will demonstrate ability to conduct research or applied


Computer Science projects, requiring writing and presentation skills
which exemplify scholarly style in computer science.

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)

The systems development life cycle is a project management technique that


divides complex projects into smaller, more easily managed segments or
phases.
Segmenting projects allows managers to verify the successful completion of
project phases before allocating resources to subsequent phases. Software
development projects typically include initiation, planning, design,
development, testing, implementation, and maintenance phases. However,
the phases may be divided differently depending on the organization
involved.
For example, initial project activities might be designated as request,
requirements-definition, and planning phases, or initiation,
concept-development, and planning phases. End users of the system under
development should be involved in reviewing the output of each phase to
ensure the system is being built to deliver the needed functionality.
7
PHASES OF SYSTEM DEVELOPMENT
LIFE CYCLE

INITIATION PHASE:
The Initiation Phase begins when a business sponsor identifies a need or an
opportunity.

SYSTEM CONCEPT DEVELOPMENT PHASE:


The System Concept Development Phase begins after a business need or opportunity
is validated by the Agency/Organization Program Leadership.

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.

REQUIREMENTS ANALYSIS PHASE:


This phase formally defines the detailed functional user requirements using high-level
requirements identified in the Initiation, System Concept, and Planning phases. It also
delineates the requirements in terms of data, system performance, security, and
maintainability requirements for the system.

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.

OPERATIONS AND MAINTENANCE PHASE:


The system operation is ongoing. The system is monitored for continued performance in
accordance with user requirements and needed system modifications are incorporated.
Operations continue as long as the system can be effectively adapted to respond to the
organization’s needs.

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.

● MySQL is a freely available open-source Relational database management


System (RDBMS) that uses Structured Query Language (SQL). It is
downloadable from site www.MySQL.org.in MySQL database, information is
stored in tables. A single MYSQL database can contain many tables at once
and thousands of individual records. MySQL is a fast, reliable, scalable
alternative to many of the commercial RDBMS available today.

KEY FEATURES OF MYSQL:


● Speed
● Ease of use
● Cost
● Query language support
● Portability
● Data types
● Securities
● Scalability and limits
● Connectivity Localization

SQL ENABLES THE FOLLOWING:


● Creating/modifying the database's structure.
● Changing securities for the system.
● Permitting uses for working on databases or tables

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')

connection = mysql.connect(host='localhost', user=USER, password=PASSWORD, database=DB)


cursor = connection.cursor()
if(connection.is_connected() == False):
print("[-] Please give in the correct credentials.")

cursor.execute("CREATE TABLE IF NOT EXISTS movies (id int, name VARCHAR(255), phone int,
email VARCHAR(255), count int)")
return cursor, connection

def DisplayMovies():#to display the list of movies available


movieList = ["1:Black Panther: Wakanda Forever","2:The Batman","3:Bullet Train", "4:Nope",
"5:RRR", "6:Top Gun: Mavric", "7:Jurassic World: Dominion", "8:Doctor Strange in The
Multiverse of Madness","9:KGF:Chapter 2","10:Minions: The Rise of Gru"]

for i in range(10):
print(movieList[i])
choice = int(input("Enter your choice:"))
movieChosen = movieList[choice-1]
return movieChosen

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

def MovieInfo(movieChosen): #to display the information of the movie chosen


movieInfo = {"1:Black Panther: Wakanda Forever":"description",
"2:The Batman":"description",
"3:Bullet Train":"description",
"4:Nope":"description",
"5:RRR":"description",
"6:Top Gun: Mavric":"description",
"7:Jurassic World: Dominion":"description",
"8:Doctor Strange in The Multiverse of Madness":"description",
"9:KGF:Chapter 2":"description",
"10:Minions: The Rise of Gru":"description"}
print(movieChosen)
print("Description:",movieInfo[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")

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

def Primary_array(a,b):# fills the seat in the theater


arr[a][b]="F"

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

def Amount(n_seates):# To display the final amount of the movie


try:
amount = n_seates*250
gst = (0.18*amount)
convenience_fee = gst+60
f_amount = amount+gst+60
print("Ticket price=",amount,"\nconvenience_fee=",convenience_fee)
print()
print("Before proceeding to pay we would like you to fill some personal details for security
reasons: ")
print("Total Payable Amount:",f_amount)
except:
print("[-] There was some unexpected error. Please try again!")
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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.")

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

def Payment():# to accept the payment


try:
print()
print("enter 1 for UPI else enter 2 for card ")
choice = int(input("Enter your choice 1 or 2:"))
if choice==1:
id_upi = input("enter UPI ID")
print("\rProcessing.......")
time.sleep(random.randint(0,5))
print("\rPayment successful")
elif choice == 2:
cardD = input("Enter Card Number")
print("\rProcessing.......")
time.sleep(random.randint(0,5))
print("\rPayment successful")
return ''.join(random.choices(string.ascii_uppercase + string.digits, k = 10))
except:
print("[-] There was some unexpected error. Please try again!")

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

def Tickets(orderID,theaterName,movie_name): #To print the ticket


print()
print("~"*100)
print("Your ticket")
print()
print("Order ID:",orderID)
print("(3D)",movie_name)
print("ENGLISH WITH ENGLISH SUBTITLES\n(IMAX)\nENGLISD (U/A)")
print("~"*100)
print(theaterName)
print("AUDI 02 ")
for i in range(len(seatNo)):
print(seatNo[i], end=",")
print("~"*100)
print()
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17
# Invoke the functions

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

● OPERATING SYSTEM : WINDOWS 10 AND ABOVE

● PROCESSOR : PENTIUM(ANY) OR

AMD ATHALON (3800+- 4200+ DUAL CORE)

● MOTHERBOARD : 1.845 OR 915,995 FOR PENTIUM OR

MSI K9MM-V VIA K8M800+8237R PLUS


CHIPSET FOR AMD ATHALON

● RAM : 512MB+

● Hard disk : SATA 40 GB OR ABOVE

● MONITOR 14.1 or 15 -17 inch

● Keyboard and mouse

20
BIBLIOGRAPHY

● COMPUTER SCIENCE with python - Textbook for class 11

● COMPUTER SCIENCE with python - Textbook for class 12

● GOOGLE

● www.geeksforgeeks.org

21

You might also like