IP Project File
IP Project File
TERM - II
Developed By
Divyansh Chaudhary
Sno Description
1 Certificate
2 Acknowledgement
3 Introduction
4 Source Code
5 Output Screen
Certificate
This is to certify that Hotel Management System is
developed by Divyansh Chaudhary under my
supervision in the session 2021-2022 for Informatics
Practices. The work done by them is original.
Today one cannot afford to rely on the fallible human beings who
really want to stand against today’s merciless competition where
not to 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.
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.
SOURCE CODE
from sys import exit
conn=sql.connect(host='localhost',user='root',passwd='',database
='project')
if conn.is_connected():
print('successfully connected')
c1=conn.cursor()
print('---------------------------------------------')
print('---------------------------------------------')
print("1.LOGIN")
print("2.EXIT")
if choice==1:
print('connected')
print("WELCOME TO HOSPITAL")
print("successfully connected")
print('1.RegisteringPatient details')
print('2.RegisteringDoctor details')
print('3.RegisteringWorker details')
print('7.Patient detail')
print('8.Doctor detail')
print('9.Worker detail')
print('10.Exit')
if choice==1:
p_age=int(input('Enter Age:'))
values(""'"+p_name+"',"+str(p_age)+",'"+p_problems+"',"+str(p_ph
ono)+")"
c1.execute(sql_insert)
print('SUCCESSFULLY REGISTERED')
conn.commit()
elif choice==2:
values(""'"+d_name+"',"+str(d_age)+",'"+d_department+"',"+str(d_
phono)+")"
c1.execute(sql_insert)
print('successfully registered')
conn.commit()
elif choice==3:
w_age=int(input('Enter Age:'))
values(""'"+w_name+"',"+str(w_age)+",'"+w_workname+"',"+str(w_ph
ono)+")"
c1.execute(sql_insert)
print('successfully registered')
conn.commit()
elif choice==4:
r = c1.fetchall()
for i in r :
print(i)
elif choice==5:
sql_x="select*from doctor_details"
c1.execute(sql_x)
s=c1.fetchall()
for i in s:
print(i)
elif choice==6:
sql_y="select*from worker_details"
c1.execute(sql_y)
t=c1.fetchall()
for i in t:
print(i)
elif choice==7:
p_name=("{}")'.format(h)
c1.execute(sql_w)
u = c1.fetchall()
for i in u:
print(i)
elif choice==8:
p_name=("{}")'.format(d)
c1.execute(sql_d)
v=c1.fetchall()
for i in v:
print(i)
elif choice==9:
p_name=("{}")'.format(f)
c1.execute(sql_f)
w=c1.fetchall()
for i in w:
print(i)
elif choice==10:
exit()
break
else:
print('wrong username&password')
if choice==2:
exit()
Output Screens
(with all main screens)
Login output:
After login: