Professional Documents
Culture Documents
Session 2023-2024
INFORMATICS PRACTICES
BOOK MY SHOW
About Python
Spyder is an open-source cross-platform IDE. The
Python Spyder IDE is written completely in Python.
It is designed by scientists and is exclusively for
scientists, data analysts, and engineers. It is also
known as the Scientific Python Development IDE
and has a huge set of remarkable features
About MySQL
MySQL is a relational database management system
(RDBMS) developed by Oracle that is based on
structured query language (SQL). A database is a
structured collection of data. ... In this model, tables
consist of rows and columns, and relationships
between data elements all follow a strict
logical structure.
PYTHON CODING
import mysql
con=mysql.connector.connect(host='localhost', user= 'root'
,password='123',db='test')
if con.is_connected()==False:
print("error")
cr=con.cursor()
cr.execute('USE myshow')
sql="create table info(About_the_Cinema varchar(100), Screens varchar(50),
Empolyees varchar(200))"
cr.execute(sql)
sql="create table status (Name varchar(100), Actor varchar(50),Actress
varchar(50),Songs varchar(15), Ranking varchar(15))"
cr.execute(sql)
sql="create table sd(spade varchar(200), diamond varchar(200))"
cr.execute(sql)
sql="create table hc(heart varchar(200), club varchar(200))"
cr.execute(sql)
global f
f=0
#this t_movie function is used to select movie name
def t_movie():
global f
f=f+1
print("which movie do you want to watch?")
print("1,Mission Mangal")
print("2, Dil Bechara")
print("3, Alladin")
print("4, Spider-Man Far From Home")
elif movie == 2:
print("Movie - Dil Bechara")
print("Hero - Sushant Singh Rajput")
print("Heroine - Sanjana Singh")
print("Number of songs - 4")
print("Ranking - Hit.")
elif movie == 3:
print("Movie - Alladin")
print("Hero - Mena Massoud")
print("Heroine - Naomi Scott")
print("Ranking - Hit.")
print("Number of songs - 7")
elif movie == 4:
print("Movie - Spyder-Man Far From Home")
print("Hero - Tom Holland")
print("Heroine - Zendaya")
print("Ranking - Hit.")
print("Number of songs - 5")
else:
print("wrong choice")
if f == 1:
theater()
#this theater function used to select screen
def theater():
print("which screen do you want to watch movie: ")
print("1,DIAMOND ")
print("2,SPADE")
print("3,HEART")
print("4,CLUB")
a = int(input("chosse your screen:"))
if a == 1:
print("DIAMOND :-")
print("It has 5000 sqaure feet.")
print("It has total 100 seats.")
print("The screen area is 60 x 80.")
print("There are 26 rows each conataining 10 seats.")
elif a == 2:
print("SPADE :-")
print("It has 6000 sqaure feet.")
print("It has total 150 seats.")
print("The screen area is 70 x 90.")
print("There are 28 rows each conataining 10 seats.")
elif a == 3:
print("HEART:-")
print("It has 8000 sqaure feet.")
print("The screen area is 60 x 80.")
print("It has total 100 seats.")
print("There are 30 rows each conataining 10 seats.")
elif a == 4:
print("CLUB:-")
print("It has 7000 sqaure feet.")
print("It has total 150 seats.")
print("The screen area is 50 x 70.")
print("There are 27 rows each conataining 10 seats.")
else:
print("wrong choice")
ticket = int(input("number of ticket do you want?:"))
timing(a)
#this timing function used to select timing for movie
def timing(a):
time1 = {
"1":"10.00-1.00",
"2":"1.10-4.10",
"3":"4.20-7.20",
"4": "7.30-10.30"
}
time2 = {
"1":"10.15-1.15",
"2": "1.25-4.25",
"3":"4.35-7.35",
"4": "7.45-10.45"
}
time3 = {
"1":"10.30-1.30",
"2": "1.40-4.40",
"3": "4.50-7.50",
"4": "8.00-10.45"
}
time4 = {
"1":"10.15-1.15",
"2":"1.30-4.30",
"3": "4.45-7.45",
"4":"8.00-10.45"
}
if a == 1:
print("choose your time:")
print(time1)
t=input("select your time:")
x = time1[t]
print("successful!!, enjoy movie at "+x)
elif a == 2:
print("choose your time:")
print(time2)
t=input("select your time:")
x = time2[t]
print("successfull!, enjoy movie at "+x)
elif a == 3:
print("choose your time:")
print(time3)
t=input("select your time:")
x = time3[t]
print("successful!!, enjoy movie at "+x)
print("successful!!, enjoy movie at "+x)
elif a == 4:
print("choose your time:")
print(time4)
t = input("select your time:")
x = time4[t]
print("successfull!, enjoy movie at "+x)
else:
print("wrong choice")
return 0
def movie(theater):
if theater == 1:
t_movie()
elif theater==2:
t_movie()
elif theater == 3:
t_movie()
elif theater == 4:
city()
else:
print("wrong choice")
def center():
print("which theater do you wish to see movie?")
print("1,Cine park")
print("2, Empress Cinema")
print("3,Rajhans Cinema")
print("4, Daman Talkies")
a = int(input("choose your option: "))
if a == 1:
print("Cine Park")
print("About_the_Cinema: - Cine Park: Chala, Vapi started in the year
2015.")
print("It was started by Mr.JK Ambani.")
print("The cinema ranks 2nd in the city.")
print("Employees - Mr. Suresh,")
print("Mr.Rakesh,")
print("Mr. Sohail.")
elif a == 2:
print("Empress Cinema ")
print("About_the_Cinema - Empress Cinema: Gunjan, Vapi started in the
year 2012.")
print("It was started by Mr.AK Maheshwari.")
print("The cinema ranks 1nd in the city.")
print("Employees:- Mr. Sanjay,")
print("Mr. Ramesh,")
print("Mr.Akash.")
elif a == 3:
print("Rajhans")
print("About_the_Cinema:- Rajhans: Valsad started in the year 2017.")
print("It was started by Mr.Ravi Singh.")
print("The cinema ranks 2nd in the city.")
print("Employees :- Mr.Ankit.")
print("Mr.Karan,")
print("Mr.Meet.")
elif a == 4:
print("Daman Talkies")
print("About_the_Cinema:- Daman Talkies: Daman started in the year
2014.")
print("It was started by Mr. Ritvik Jain.")
print("The cinema ranks 1st in the city.")
print("Employees :- Mr. Nishant,")
print("Mr. Vikash.")
print("Mr. Rahul,")
else:
print("wrong choice")
movie(a)
return 0
if place == 1:
center()
elif place == 2:
center()
elif place == 3:
center()
else:
print("wrong choice")
city()
PYTHON OUTPUT