CD & DVD Management system
Anonymous User
362

Want output please send it's urgent***

import mysql.connector as sql
conn=sql.connect(host="localhost", user="root",
passwd="manager",database="dvd")
if conn.is_connected():
print("HELLO")

c1=conn.cursor()
c1.execute('use dvd')
c1=conn.cursor()
print("WELCOME TO GGGS CD,DVD STORE")
print(' ')
print(' ')
from time import gmtime,strftime
a=strftime("%a,%d%b%y",gmtime())
print(a)
print(' ')
print(' ')
name=input("enter your name:")
n=name.capitalize()
print(' ')
print('OUR HEARTY WELCOMES TO',n)
print(' ')
print("1.login")
print("2.To create account")
print("3.exit")
print('')
choice=int(input("enter your choice:"))
print(' ')
if choice==1:
a=int(input("enter user_id:"))
c1.execute("select passwd from login_id where user_id =
"+str(a)+";")
data=c1.fetchall()
data=data[0]
data=list(data)
data=data[0]
data=str(data)
print(' ')
print(' ')
b=int(input("enter passwd:"))
conn.cursor()
conn.commit()
print(' ')
print('THE MENU AVAILABLE')
print(' ')
print('4.online order')
print(' ')
print(' ')
print('5.cd details')
print(' ')
print(' ')
print('6.dvd details')
print(' ')
print(' ')
print('7.job oppurtunities')
print(' ')
print(' ')
choice2=int(input("enter your choice for further
proceedings:"))
if choice2==5:
v_year_of_release=int(input("enter the year:"))
v_language=input("enter ur language:")
print("1.horror")
print("2.comedy")
print("3.action")
print("4.inspiration")
print("5.sentimental")
v_type_of_movie=input("type of movie u want:")
v_movie_name=input("enter movie name:")
print("details uploaded")
V_SQL_INSERT1="insert into cd_details
values("+str(v_year_of_release)+",'"+v_type_of_movie+"','"+v_m
ovie_name+"','"+v_language+"')"
c1.execute(V_SQL_INSERT1)
print("movie added to your cart")
conn.commit()
if choice2==6:
v_dvd_model=input("enter dvd model:")
v_dvd_name=input("enter dvd company:")
v_version=int(input("enter the version you need:"))
v_range_of_amt=int(input("the amt of product u
expect:"))
if v_range_of_amt>=5000:
print("best products awaits you")
else:
print("we can provide the best if there is
offers")
V_SQL_INSERT2="insert into dvd_detail
values('"+v_dvd_model+"','"+v_dvd_name+"',"+str(v_version)+","
+str(v_range_of_amt)+")"
c1.execute(V_SQL_INSERT2)
print("dvd added to your cart !!!")
conn.commit()
if choice2==4:
v_customer_name=input("enter name:")
print("welcome",v_customer_name,"to our shop")
v_age=int(input("enter ur age:"))
v_mobile_number=int(input("enter ur phno:"))
v_cd_or_dvd=input("enter what you want(cd or dvd):")
if v_cd_or_dvd=="cd":
v_year_of_release=int(input("enter the year:"))
v_language=input("enter ur language:")
print("1.horror")
print("2.comedy")
print("3.action")
print("4.inspiration")
print("5.sentimental")
v_type_of_movie=input("type of movie u want:")
v_movie_name=input("enter movie name:")
print("details uploaded")
V_SQL_INSERT1="insert into cd_details
values("+str(v_year_of_release)+",'"+v_type_of_movie+"','"+v_m
ovie_name+"','"+v_language+"')"
c1.execute(V_SQL_INSERT1)
print("movie added to your cart")
conn.commit()
elif v_cd_or_dvd=="dvd":
v_dvd_model=input("enter dvd model:")
v_dvd_name=input("enter dvd name:")
v_version=int(input("enter the version you
need:"))
v_range_of_amt=int(input("the amt of product u
expect:"))
if v_range_of_amt>=10000:
print("best products awaits you")
else:
print("we can provide the best if there is
offers")
V_SQL_INSERT2="insert into dvd_detail
values('"+v_dvd_model+"','"+v_dvd_name+"',"+str(v_version)+","
+str(v_range_of_amt)+")"
c1.execute(V_SQL_INSERT2)
print("dvd added to your cart !!!")
conn.commit()
else:
print("sorry we didn't get you”)
V_SQL_INSERT1="insert into online
values('"+v_customer_name+"',"+str(v_age)+","+str(v_mobile_num
ber)+",'"+v_cd_or_dvd+"')"
c1.execute(V_SQL_INSERT1)
comments=input("you can give comments:")
conn.commit()
print("your order will accpected once u detail ur
material")
if choice2==7:
v_name=print("you are",n)
print(" ")
v_age=int(input("enter your age:"))
print(" ")
v_qualification=input("enter your qualification:")
print(" ")
v_date_of_birth=input("enter your date birth:")
print(" ")
print("1.manager")
print(" ")
print("2.salesman")
print(" ")
print("3.general employee")
print(" ")
print("4.multi task")
print(" ")
v_type_of_work=input("enter the type of work you want:")
if v_type_of_work=="manager":
print("vacancy available:1")
print("attend interview and if you perform fine")
print("call letter will be sent")
print("you can take over the post of manager once
you get the call letter")
print("salary per month:100 or Rs7000")
elif v_type_of_work=="general employee":
print("vacancy available:10")
print("you can join if vacancy available")
print("salary per month:400 or Rs28000")
else:
print("SORRY,we can't afford you jobs more than
this")
V_SQL_INSERT2="insert into job
values('"+v_name+"',"+str(v_age)+",'"+v_qualification+"',"+str
(v_date_of_birth )+",'"+v_type_of_work+"')"
c1.execute(V_SQL_INSERT2)
comments=input("you can give comments:")
conn.commit()

if choice==2:
print('to create your account please enter your user id
and password')
c1=conn.cursor()
#c1=conn.cursor("('create table login_id(user_id
varchar(100) primary key,passwd varchar(100),name
varchar(100))')
v_user_id=int(input("choose your user id (in
integer):"))
print('')
v_passwd=int(input("create your password (in
integer):"))
print('')
v_name=input("your full name:")
print('')
c1=conn.cursor()
update="insert into login_id values("+ str(v_user_id)
+","+ str(v_passwd) +",'"+ v_name +"')"
c1.execute(update)
conn.commit()
print("account created")

if choice==3:
print("THANK YOU",n)
print("VISIT AGAIN")
comments=input("you can give comments:")

Comments (1)