You are on page 1of 11

VELAMMAL VIDYALAYA

ALAPAKKAM

Academic Session : 2022-23


SUBJECT : COMPUTER SCIENCE

SUBMITTED BY:
NAME OF THE STUDENT : HARINI.JM
CLASS & SEC : XII-C
EXAM NO :
SUBMITTED TO TEACHER NAME: MR.PRAVEEN

TOPIC : MOVIE TICKET BOOKING SYSTEM


VELAMMAL EDUCATIONAL TRUST

VELAMMAL VIDYALAYA, ALAPAKKAM

Name : Batch No :

Class : Regd. No :

Certificate

Teacher — In- Charge


MR. PRAVEEN

Submitted for the Practical Examination in at


held on

Principal Internal Examiners External Examiner


ACKNOWLEDGEMENT

In the accomplishment of this project successfully, many people have


bestowed their blessings and heart pledged support upon me, I take this
opportunity to express my gratitude to all, who have been instrumental in
the successful completion of this project.

Primarily, I express my deep sense of gratitude to the luminary.


The Correspondent, Shri, VEL MOHAN, The Management
Coordinator Ms. TRISHNNA, The Principal. Dr. Y HEMALATHA,
Senior Head Master Dr. R SRIDHAR for providing the best of facilities
and environment to bring out innovation and spirit of inq uiry through this
venture.

I am deeply indebted to my teachers, without whose constructive


feedback, this project would not have been successful. The valuable
advice and suggestions for correction, modifications and improvement did
enhance the quality of the task.

I would also like to thank my parents, friends and all the members
who contributed to this project was vital for the success of the project.
I am grateful for their constant support and help.

PROGRAM CODE

import mysql.connector as sql


conn = sql.connect(host='localhost', user='root', password='harini0803',
database='Theatre')
c1 = conn.cursor()
if not conn.is_connected():
print('invalid')
else:
print("**********WELCOME TO XII-C THEATRE**********")
print('~~~~~~~~~~ XII-C THEATRE BOOKING (AC & NON AC)
~~~~~~~~~~')
ch = int(input("Enter your choice 1.Ticket Booking 2.Box Office 3.1st Class 4.2nd
Class :"))
if ch == 1:
name = input("Enter the movie name :")
phno = input("Enter phone number :")
tic = int(input("Enter total tickets :"))
gender = input("Enter your gender :")
fname = input("Enter your first name :")
lname = input("Enter your last name :")
passwd = input("Enter your passwd :")
userID = input("Enter your userID :")
snacks = input("Order your snacks :")
price = tic*100
ins = f"insert into ticket_booking
values('{name}','{phno}','{tic}','{gender}','{fname}','{lname}','{passwd}','{userID
}','
{snacks}','{price}')"
c1.execute(ins)
conn.commit()
print("******************TICKETS BOOKED******************")
print('******************THANK YOU COME
AGAIN*******************')
a = input('Do you want to continue?(yes/no)')
while a=='yes':
ch = int(input("Enter your choice 1.Ticket Booking 2.Box Office 3.1st Class
4.2nd Class :"))
break
if ch==2:
print("******************WELCOME TO XII-C
THEATRE*******************")
print("################ WELCOME TO THE BOX OFFICE
(AC)##################")
name = input("Enter the movie name :")
phno = input("Enter phone number :")
tic = int(input("Enter total tickets :"))
gender = input("Enter your gender :")
fname = input("Enter your first name :")
lname = input("Enter your last name :")
passwd = input("Enter your passwd :")
userID = input("Enter your userID :")
snacks = input("Order your snacks :")
price = tic * 500
ins = f"insert into box_office
values('{name}','{phno}','{tic}','{gender}','{fname}','{lname}','{passwd}','{userID
}','
{snacks}','{price}')"
c1.execute(ins)
conn.commit()
print("*********************TICKETS
BOOKED***********************")
print('******************THANK YOU COME
AGAIN*******************')
a = input('Do you want to continue?(yes/no)')
while a == 'yes':
ch = int(input("Enter your choice 1.Ticket Booking 2.Box Office 3.1st Class
4.2nd Class :"))
break
if ch==3:
print("************welcome to 1st class ticket booking **************")
name = input("Enter the movie name :")
phno = input("Enter phone number :")
tic = int(input("Enter total tickets :"))
gender = input("Enter your gender :")
fname = input("Enter your first name :")
lname = input("Enter your last name :")
passwd = input("Enter your passwd :")
userID = input("Enter your userID :")
snacks = input("Order your snacks :")
price = tic * 300
ins = f"insert into 1st_class
values('{name}','{phno}','{tic}','{gender}','{fname}','{lname}','{passwd}','{userID
}','
{snacks}','{price}')"
c1.execute(ins)
conn.commit()
print("*********************TICKETS
BOOKED***********************")
print('******************THANK YOU COME
AGAIN*******************')
a = input('Do you want to continue?(yes/no)')
while a == 'yes':
ch = int(input("Enter your choice 1.Ticket Booking 2.Box Office 3.1st Class
4.2nd Class :"))
break
if ch == 4:
print("*************WELCOME TO XII-C THEATRE*************")
print ("!!!!!!!!!!!!WELCOME TO 2nd CLASS TICKET BOOKING !!!!!!!!!!!!!!")
name = input("Enter the movie name :")
phno = input("Enter phone number :")
tic = int(input("Enter total tickets :"))
gender = input("Enter your gender :")
fname = input("Enter your first name :")
lname = input("Enter your last name :")
passwd = input("Enter your passwd :")
userID = input("Enter your userID :")
snacks = input("Order your snacks :")
price = tic * 200
ins = f"insert into 2nd_class values(
'{name}','{phno}','{tic}','{gender}','{fname}','{lname}','{passwd}','{userID}','{snac
ks
}','{price}')"
c1.execute(ins)
conn.commit()
print("*********************TICKETS
BOOKED***********************")
print('******************THANK YOU COME
AGAIN*******************')
a = input('Do you want to continue?(yes/no)')
while a == 'yes':
ch = int(input("Enter your choice 1.Ticket Booking 2.Box Office 3.1st Class
4.2nd Class :"))
break

OUTPUT

You might also like