Chirag FILE Modified Updated
Chirag FILE Modified Updated
S.No. Description
1. Certificate
2. Acknowledgement
3. Synopsis
4. Source Code
5. Output
6. File Information
7. Bibliography
ACKNOWLEDGMENT
def Time():
1) 3 PM to 6 PM
2) 6 PM to 9 PM
3) 9 PM to 12 AM''')
global Time
Tim=int(input("Enter :"))
if Tim in dt:
Time=dt[Tim]
else:
print("Invalid Option!")
Time()
def Select_Type_eg():
global egi
global Ty
1)Bollywood
2)Hollywood
3)Tollywood''')
dst={1:"Bollywood",2:"Hollywood",3:"Tollywood"}
do=int(input("Enter :"))
if do in dst:
Ty=dst[do]
if Ty=="Hollywood":
1)Action
2)Drama
3)Adventure
4)Horror
5)Animation''')
Choice=int(input('Enter'))
dse={1:'Action',2:'Drama',3:'Adventure',4:'Horror',5:'Animation'}
if Choice in dse:
egi=dse[Choice]
else:
1)Action
2)Drama
3)Adventure
4)Horror
5)Comedy''')
Choice=int(input(''))
dse2={1:'Action',2:'Drama',3:'Adventure',4:'Horror',5:'Comedy'}
if Choice in dse2:
egi=dse2[Choice]
else:
Select_Type_eg()
def Display_Movies(Ty,egi):
f=open("C:\\Users\\purus\\OneDrive\\Desktop\\"+"SelectMovie"+"\\"+Ty+" "+egi+".txt",'r')
s=(f.read()).split('\n')
ni=1
for j in s:
print(ni,j)
ni=ni+1
d=dict()
for i in range(len(s)):
d[i+1]=s[i]
zi=int(input("Enter Option To See Details of Movie"))
if zi<=len(s):
Mov=d[zi]
Movie_Database(Mov)
else:
print("Enter Valid")
Display_Movies(Ty,egi)
def Add_Movie(Ty,egi):
fa=open("C:\\Users\\purus\\OneDrive\\Desktop\\"+"SelectMovie"+"\\"+Ty+" "+egi+".txt",'a')
f=open("C:\\Users\\purus\\OneDrive\\Desktop\\"+"SelectMovie"+"\\"+Ty+" "+egi+".txt",'r')
s=(f.read()).split('\n')
if s==['']:
fa.write(amo)
f.close
fa.close()
else:
fa.write('\n'+amo)
f.close
fa.close()
def Delete_Movie(Ty,egi):
f=open("C:\\Users\\purus\\OneDrive\\Desktop\\"+"SelectMovie"+"\\"+Ty+" "+egi+".txt",'r')
s=(f.read()).split('\n')
ni=1
for j in s:
print(ni,j)
ni=ni+1
d=dict()
for i in range(len(s)):
d[i+1]=s[i]
else:
d.pop(l)
f.close()
fd=open("C:\\Users\\purus\\OneDrive\\Desktop\\"+"SelectMovie"+"\\"+Ty+"
"+egi+".txt",'w')
Num=0
for v in d.values():
if Num!=len(d)-1:
fd.write(v+'\n')
else:
fd.write(v)
Num+=1
fd.close()
def Select(Type,eg):
f=open("C:\\Users\\purus\\OneDrive\\Desktop\\"+"SelectMovie"+"\\"+Type+"
"+eg+".txt",'r')
s=(f.read()).split('\n')
ni=1
for j in s:
print(ni,j)
ni=ni+1
d=dict()
for i in range(len(s)):
d[i+1]=s[i]
if l not in d:
else:
f.close()
print(d[l])
Movi=d[l]
theater()
Time()
BookingSystem(Movi,Type,screen)
role=''
def Display_Data():
mycon = None
try:
mycon = mysql.connector.connect(
host='localhost',
user='root',
passwd='sqQuUAalo21&900',
database='sys'
cursor = mycon.cursor()
cursor.execute(query)
data=cursor.fetchall()
dat=PrettyTable()
l1=['Id','Name','Password','Role','Description']
dat.field_names=l1
for j in data:
dat.add_row(j)
dat.sortby='Id'
print(dat)
print('Error:',err)
finally:
print('')
def Add_Employee():
mycon = None
try:
mycon = mysql.connector.connect(
host='localhost',
user='root',
passwd='sqQuUAalo21&900',
database='sys'
Id=int(input("Enter id"))
name=input("Enter name")
password=input("Enter pass")
rol=input("Enter Role")
cursor = mycon.cursor()
cursor.execute(query)
mycon.commit();
print("Error:",err)
finally:
mycon.close()
def Remove_Employee():
mycon = None
try:
mycon = mysql.connector.connect(
host='localhost',
user='root',
passwd='sqQuUAalo21&900',
database='sys'
cursor = mycon.cursor()
Id=int(input("Enter Id:"))
cursor.execute(query)
mycon.commit();
print("Error:",err)
finally:
mycon.close()
print('')
def Authentication():
mycon = None
try:
mycon = mysql.connector.connect(
host='localhost',
user='root',
passwd='sqQuUAalo21&900',
database='sys'
print('______________________________________')
if mycon.is_connected():
print('______________________________________')
else:
return
cursor = mycon.cursor()
query="SELECT *FROM bookingsystem WHERE empid=%s and password = %s"
cursor.execute(query, (EmpId,password,))
data=cursor.fetchone()
global role
if data:
role=data[3]
else:
role="n"
print("Error:",err)
finally:
mycon.close()
print('')
CinemaSystem(role)
def Movie_Database(Mov):
print('')
if movie['name'].lower() ==Mov.lower():
for i in movie['description']:
print(i)
else:
break
print('')
def Readfile(Movi,screen,Type):
global h
h="C:\\Users\\purus\\OneDrive\\Desktop\\Cinema
Sytstem\\Threater\\Screens"+"\\"+screen+"\\"+Type+"\\"+Time+"\\"+Movi+'('+screen+')'+".txt"
f=open(h,"r")
re=f.read()
print(re)
f.close()
def Writefile(Movi,screen,Type):
global h
h="C:\\Users\\purus\\OneDrive\\Desktop\\Cinema
Sytstem\\Threater\\Screens"+"\\"+screen+"\\"+Type+"\\"+Time+"\\"+Movi+'('+screen+')'+".txt"
s=""
f=open(h,"w")
for i in range(len(l)):
r2=l[i]
for j in range(len(r2)):
s=s+l[i][j]
s=s+"\n"
f.write(s)
f.close()
def createTheatre(l):
global r
r=9
global c
c=10
l.append([' 1 ','2 ','3 ','4 ' ,'5 ', ' 6 ','7 ','8 ','9 ','10 '])
for i in range(r):
rl=list()
rl.append(str(i+1)+' ')
for j in range(c//2):
rl.append("O ")
rl.append('___ ')
for j in range(c//2,c):
rl.append("O ")
l.append(rl)
def Bookseats(Movi,Type):
global ticket
global Tempticket
Tempticket=0
if ticket>0:
for k in range(ticket):
Writefile(Movi,screen,Type)
if col>c//2:
l[row][col+1]='X '
ticket=ticket-1
Tempticket=Tempticket+1
else:
l[row][col]='X '
ticket=ticket-1
Tempticket=Tempticket+1
ticket=0
else:
theater()
def displayseats(l,Movi,screen,Type):
Writefile(Movi,screen,Type)
Readfile(Movi,screen,Type)
def theater():
print("3) 4DX")
scr={1:'Standard Digital(2D)',2:'RealD 3D',3:'4DX'}
if a==1:
cost=500
print('Cost-',cost)
elif a==2:
cost=1000
print('Cost-',cost)
elif a==3:
cost=2000
print('Cost-',cost)
else:
print('Enter Valid')
theater()
global screen
screen=scr[a]
global ticket
s=1
for i in range(1,ticket+1):
s=cost*i
print('Total cost',s)
if z in 'Yy':
elif z in "Nn":
theater()
else:
print("Enter Valid")
theater()
def cancel_seat():
global Tempticket
if ti<=Tempticket:
for k in range(ti):
if col>c//2:
l[row][col+1]='O '
Tempticket=Tempticket-1
else:
l[row][col]='O '
Tempticket=Tempticket-1
print("Your Booking has successfully Cancelled And Money Also been Refunded")
else:
print("Enter Valid!")
return
l=list()
createTheatre(l)
def BookingSystem(Movi,Type,screen):
while True:
if choice == '1':
displayseats(l,Movi,screen,Type)
Bookseats(Movi,Type)
cancel_seat()
elif choice == '4':
break
else:
print('''1)Book a Seat
3)Main Menu''')
if cho==1:
Bookseats(Movi,Type)
if cho==2:
print('')
if cho==3:
break
if cho>3 or cho<1:
def MovieSystem():
while True:
1)Bollywood
2)Hollywood
3)Tollywood''')
global Ch
Ch=int(input(""))
Typi={1:'Bollywood',2:'Hollywood',3:'Tollywood'}
Type=Typi[Ch]
if Ch==1:
1)Action
2)Drama
3)Adventure
4)Horror
5)Comedy''')
Choice=int(input(''))
dc1={1:'Action',2:'Drama',3:'Adventure',4:'Horror',5:'Comedy'}
if Choice in dc1:
eg=dc1[Choice]
Select(Type,eg)
elif Ch==2:
1)Action
2)Drama
3)Adventure
4)Horror
5)Animation''')
Choice=int(input('Enter'))
dc2={1:'Action',2:'Drama',3:'Adventure',4:'Horror',5:'Animation'}
if Choice in dc2:
eg=dc2[Choice]
Select(Type,eg)
elif Ch==3:
1)Action
2)Drama
3)Adventure
4)Horror
5)Comedy''')
Choice=int(input('Enter'))
dc3={1:'Action',2:'Drama',3:'Adventure',4:'Horror',5:'Comedy'}
if Choice in dc3:
eg=dc3[Choice]
Select(Type,eg)
else:
print("Enter valid")
if s in "nN":
break
print('Enter valid')
def CinemaSystem(role):
if role=='admin':
while True:
print("1.Movies")
print("2.Employees Data")
print("3.Exit")
g=int(input(""))
if g==1:
1)Book a Movie
2)Add a Movie
3)Remove a Movie
zo=int(input("Enter :"))
if zo in [1,2,3,4]:
if zo==1:
MovieSystem()
elif zo==2:
Select_Type_eg()
Add_Movie(Ty,egi)
elif zo==3:
Select_Type_eg()
Delete_Movie(Ty,egi)
elif zo==4:
Select_Type_eg()
Display_Movies(Ty,egi)
else:
print("Enter Valid!")
CinemaSystem(role)
elif g==2:
zo=int(input("Enter :"))
if zo in [1,2,3]:
if zo==1:
Add_Employee()
elif zo==2:
Remove_Employee()
elif zo==3:
Display_Data()
else:
print("Enter Valid!")
CinemaSystem(role)
elif g==3:
break
else:
elif role=='n':
Authentication()
else:
while True:
print("---Select the below options---")
print("1.Movies")
print("2.Exit")
g=int(input(""))
if g==1:
MovieSystem()
elif g==2:
break
else:
Movie_database = [
{"name": "Jawan (2023)", "description": ["Intro: Action-packed film about a vigilante fighting
against corruption","Director: Atlee","Writers: Atlee","Stars: Shah Rukh Khan"]},
{"name": "Antim: The Final Truth (2021)", "description": ["Intro: A gritty crime drama
revolving around the battle between a cop and a gangster","Director: Mahesh
Manjrekar","Writers: Abhijit Khandkekar","Stars: Salman Khan, Aayush Sharma"]},
{"name": "Tanhaji: The Unsung Warrior (2020)", "description": ["Intro: A historical drama
about the life of Maratha warrior Tanhaji Malusare","Director: Om Raut","Writers: Prakash
Kapadia","Stars: Ajay Devgn, Kajol, Saif Ali Khan"]},
{"name": "Pathaan (2023)", "description": ["Intro: A high-octane action film featuring a spy
on a mission to save India","Director: Siddharth Anand","Writers: Shridhar Raghavan","Stars:
Shah Rukh Khan, Deepika Padukone, John Abraham"]},
{"name": "Sardar Udham (2021)", "description": ["Intro: Biographical film about the
revolutionary Udham Singh","Director: Shoojit Sircar", "Writers: Shubhendu Bhattacharya",
"Stars: Vicky Kaushal"]},
{"name": "Dune: Part Two (2024)", "description": ["Intro: Continuation of the epic saga set
in a distant future","Director: Denis Villeneuve","Stars: Timothée Chalamet","Stars:Zendaya"]},
{"name": "Guardians of the Galaxy Vol. 3 (2023)", "description": ["Intro: The beloved team
of misfits returns for another cosmic adventure","Director: James Gunn", "Stars: Chris Pratt, Zoe
Saldana, Dave Bautista"]},
{"name": "Godzilla x Kong: The New Empire (2024)", "description": ["Intro: A clash of
titans as Godzilla and Kong unite against a new threat","Director: Adam Wingard","Stars:
Unknown"]},
{"name": "John Wick: Chapter 4 (2023)", "description": ["Intro: The legendary assassin
continues his fight against the high table", "Director: Chad Stahelski", "Stars: Keanu Reeves,
Donnie Yen"]},
{"name": "Pushpa: The Rise (2021)", "description": ["Intro: A story of a red sandalwood
smuggler", "Director: Sukumar", "Stars: Allu Arjun, Rashmika Mandanna"]},
{"name": "Sardar (2022)", "description": ["Intro: A biopic about the life of Sardar
Vallabhbhai Patel","Director: Unknown","Stars: Unknown"]},
{"name": "Sita Ramam (2022)", "description": ["Intro: A romantic drama set against the
backdrop of war","Director: Hanu Raghavapudi", "Stars: Dulquer Salmaan, Mrunal Thakur"]},
{"name": "Saalar (2024)", "description": ["Intro: An upcoming action film starring Prabhas",
"Director: Prashanth Neel", "Stars: Prabhas, Shruti Haasan"]},
{"name": "Gangubai Kathiawadi (2022)", "description": ["Intro: The life story of a woman
who rises to power in the underworld","Director: Sanjay Leela Bhansali","Stars: Alia Bhatt"]},
{"name": "83 (2021)", "description": ["Intro: A sports drama about India's historic cricket
World Cup win","Director: Kabir Khan","Stars: Ranveer Singh, Deepika Padukone"]},
{"name": "The Whale (2022)", "description": ["Intro: A poignant drama about a reclusive
English teacher","Director: Darren Aronofsky", "Stars: Brendan Fraser, Sadie Sink"]},
{"name": "Killers of the Flower Moon (2023)", "description": ["Intro: A historical crime
drama set in 1920s America", "Director: Martin Scorsese", "Stars: Leonardo DiCaprio, Robert De
Niro"]},
{"name": "A Man Called Otto (2023)", "description": ["Intro: A heartfelt comedy-drama
about an irritable man","Director: Marc Forster","Stars: Tom Hanks"]},
{"name": "A Beautiful Life (2023)", "description": ["Intro: A touching drama about love and
loss", "Director: Unknown", "Stars: Unknown"]},
{"name": "The Lost King (2022)", "description": ["Intro: A historical drama about the
discovery of Richard III's remains", "Director: Stephen Frears", "Stars: Sally Hawkins"]},
{"name": "Hero (2022)", "description": ["Intro: A romantic action film about a young man's
journey", "Director: Sreenu Vaitla", "Stars: Aadi Saikumar, Nivetha Pethuraj"]},
{"name": "Ustaad Bhagat Singh (2023)", "description": ["Intro: An action film based on the
legendary freedom fighter","Director:Unknown","Stars: Unknown"]},
{"name": "Dil Dhadakne Do (2015)", "description": ["Intro: A family drama set on a cruise,
exploring relationships", "Director: Zoya Akhtar", "Stars: Ranveer Singh, Priyanka Chopra,
Anushka Sharma"]},
{"name": "Bajrangi Bhaijaan (2015)", "description": ["Intro: A touching story of a man who
helps a mute girl find her family", "Director: Kabir Khan", "Stars: Salman Khan, Harshaali
Malhotra"]},
{"name": "2 States (2014)", "description": ["Intro: A romantic drama based on the book by
Chetan Bhagat", "Director: Abhishek Varman", "Stars: Arjun Kapoor, Alia Bhatt"]},
{"name": "War (2019)", "description": ["Intro: An action thriller featuring a battle between
two spies", "Director: Siddharth Anand", "Stars: Hrithik Roshan, Tiger Shroff"]},
{"name": "Indiana Jones and the Dial of Destiny (2023)", "description": ["Intro: The iconic
archaeologist returns for another thrilling adventure", "Director: James Mangold", "Stars:
Harrison Ford, Phoebe Waller-Bridge"]},
{"name": "Tire Marvels (2023)", "description": ["Intro: A comedic take on the world of
racing","Director: Unknown","Stars: Unknown"]},
{"name": "Dungeons & Dragons: Honor Among Thieves (2023)", "description": ["Intro:A
fantasy adventure based on the iconic game","Director: John Francis Daley","Stars: Chris Pine,
Michelle Rodriguez"]},
{"name": "Avatar: The Way of Water (2022)", "description": ["Intro: A sequel exploring
Pandora's underwater world", "Director: James Cameron", "Stars: Sam Worthington, Zoe
Saldaña, Sigourney Weaver, Kate Winslet"]},
{"name": "Sye Raa Narasimha Reddy (2019)", "description": ["Intro: Historical drama about
freedom fighter Uyyalawada Narasimha Reddy"]},
{"name": "Akhanda (2021)","description":["Intro:Action film about a devotee of Lord Shiva
fighting corruption","Director: Boyapati Srinu","Stars: Nandamuri Balakrishna, Pragya
Jaiswal."]},
{"name": "Evil Dead Rise (2023)","description": ["Intro:New chapter in the horror franchise,
featuring a family in peril","Director: Lee Cronin","Stars: Alyssa Sutherland."]},
{"name": "Alien: Romulus (2024)", "description": ["Intro: Upcoming addition to the iconic
sci-fi franchise","Director:Fede Álvarez","Stars: Unknown"]},
{"name": "Smile (2022)", "description": ["Intro: A psychological horror film about a
therapist haunted by traumatic experiences","Director: Parker Finn", "Writers: Parker
Finn","Stars: Sosie Bacon, Jessie T. Usher"]},
{"name": "Insidious: The Red Door (2023)", "description": ["Intro: The fifth installment in
the Insidious franchise, focusing on the Lambert family", "Director: Patrick Wilson","Writers:
Scott Teems", "Stars: Ty Simpkins, Patrick Wilson"]},
{"name": "Kajal Karthika (2023)", "description": ["Intro: Upcoming drama film", "Director:
Unknown", "Stars: Unknown"]},
{"name": "Maa Oori Polimera 2 (2023)", "description":[ "Intro: Sequel to the hit comedy
about village life and relationships","Director: Unknown","Stars: Unknown"]},
{"name": "Hera Pheri (2000)", "description": ["Intro: A classic comedy about three men and
their misadventures", "Director: Priyadarshan", "Writers: Neeraj Vora", "Stars: Akshay Kumar,
Sunil Shetty, Paresh Rawal"]},
{"name": "Housefull (2010)", "description": ["Intro: A comedy about a man who wants to
marry a woman from a dysfunctional family", "Director: Sajid Khan", "Writers: Farhad
Samji","Stars: Akshay Kumar, Riteish Deshmukh, Deepika Padukone"]},
{"name": "Phir Hera Pheri (2006)", "description": ["Intro: The hilarious sequel to Hera
Pheri, featuring more chaos, Director: Neeraj Vora", "Writers: Neeraj Vora", "Stars: Akshay
Kumar, Sunil Shetty, Paresh Rawal"]},
{"name": "Dhamaal (2007)", "description": ["Intro: A comedy about four lazy men who go
on a treasure hunt, Director: Indra Kumar", "Writers: Vidhu Vinod Chopra", "Stars: Arshad
Warsi, Riteish Deshmukh, Javed Jaffrey"]},
{"name": "Total Dhamaal (2019)", "description": ["Intro: The third installment in the
Dhamaal series, packed with comedy and adventure", "Director: Indra Kumar", "Writers:
Original screenplay by Indra Kumar", "Stars: Ajay Devgn, Anil Kapoor, Madhuri Dixit"]},
{"name": "Uruku Patela (2024)", "description": ["Intro: Upcoming film with a fresh
storyline", "Director: Unknown", "Stars: Unknown"]},
{"name": "Aay (2024)", "description": ["Intro: Upcoming drama film exploring family
dynamics", "Director: Unknown", "Stars: Unknown"]},
{"name": "Buddy (2024)", "description": ["Intro: Upcoming film focusing on friendship and
adventure", "Director: Unknown", "Stars: Unknown"]},
{"name": "Brahmachari (2024)", "description": ["Intro: A romantic drama about love and
self-discovery","Director: Unknown", "Stars: Unknown"]},
{"name": "Love Guru (2024)", "description": ["Intro: Upcoming romantic comedy about a
love consultant","Director: Unknown", "Stars: Unknown"]}]
Authentication()
-------------------------------------------------------------End-------------------------------------------------------------
OUTPUT
Admin→Movies→Book Movies→Bollywood→Action
→Jawan (2023) →Standard Digital(2D) →Display Seats
→Book a Seat→Display Seats→Cancel Seats →Display Seats
Hollywood→Action→John Wick : Chapter 4 (2023)
→4DX→Display Seats →Book a Seat→Display Seats
Tollywood→Action→Pushpa: The Rise(2021) →RealD 3D
→Display Seats →Book a Seat→Display Seats
Admin→Movies→Add Movies→Bollywood→Action→Movies
→Bollywood→Action→Movie Details→Jawan (2023)
Admin→Movies→Remove Movies→Bollywood→Action
→Movies→Bollywood→Action
Admin→Employees Data→Add Employees
→Display Employees Data
Admin→Employees Data→Remove Employees
→Display Employees Data
Employee→ Movies→Book Movies→Bollywood→Action
→Gangubai Kathiawadi →Standard Digital(2D) →Display
Seats →Book a Seat→Display Seats