-
Notifications
You must be signed in to change notification settings - Fork 0
/
Resort Management.py
170 lines (170 loc) · 5.55 KB
/
Resort Management.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
import mysql.connector
import datetime
global z
mydb = mysql.connector.connect(user='root', password='root', host='localhost', database='resort')
mycursor=mydb.cursor()
print("Welcome to Royal Heritage resort:")
def registercust():
L=[]
custname=input("enter name:")
L.append(custname)
addr=input("enter address:")
L.append(addr)
indate=input("enter check in date:")
L.append(indate)
outdate=input("enter check out date:")
L.append(outdate)
custdata=(L)
sql="insert into custdata(custname,addr,indate,outdate)values(%s,%s,%s,%s)"
mycursor.execute(sql,custdata)
mydb.commit()
def roomtypeview():
print("Do you want to see room type available ? ")
print("Enter 1 for yes:")
ch=int(input("enter your choice:"))
if ch==1:
sql="select * from roomtype"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
def roomrent():
print ("We have the following rooms for you:-")
print ("1. DELUXE=Rs 1000 PN\-")
print ("2. PREMIUM=Rs 2000 PN\-")
print ("3. EXECUTIVERs 3000 PN\-")
print ("4. ROYAL Rs 4000 PN\-")
x=int(input("Enter Your Choice Please->"))
n=int(input("How Many Nights Will You Stay:"))
if(x==1):
print ("you have opted for DELUXE room type ")
s=1000*n
elif (x==2):
print ("you have opted for PREMIUM room type ")
s=2000*n
elif (x==3):
print ("you have opted for EXECUTIVE room type ")
s=3000*n
elif (x==4):
print ("you have opted for ROYAL room type ")
s=4000*n
else:
print ("please choose a room")
print ("your room rent is =",s,"\n")
def restaurantmenuview():
print("Do you want to see menu available :")
print("enter 1 for yes:")
ch=int(input("enter your choice:"))
if ch==1:
sql="select * from restaurant"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
def orderitem():
global s
ch=int(input("enter your choice:"))
if ch==1:
sql="select * from restaurant"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
print("Please select from above list:")
d=int(input("enter your choice:"))
if(d==1):
print("you have ordered tea:")
a=int(input("enter quantity:"))
s=10*a
print("your amount for tea is :",s,"\n")
elif (d==2):
print("you have ordered coffee:")
a=int(input("enter quantity:"))
s=10*a
print("your amount for coffee is :",s,"\n")
elif(d==3):
print("you have ordered a softdrink:")
a=int(input("enter quantity:"))
s=20*a
print("your amount for softdrink is :",s,"\n")
elif(d==4):
print("you have ordered samosa:")
a=int(input("enter quantity:"))
s=15*a
print("your amount for samosa is :",s,"\n")
elif(d==5):
print("you have ordered sandwich: ")
a=int(input("enter quantity:"))
s=50*a
print("your amount for sandwich is :",s,"\n")
elif(d==6):
print("you have ordered wafers:")
a=int(input("enter quantity:"))
s=30*a
print("your amount for wafers is :",s,"\n")
elif(d==7):
print("you have ordered ice cream: ")
a=int(input("enter quantity:"))
s=20*a
print("your amount for ice cream is :",s,"\n")
elif(d==8):
print("you have ordered milk:")
a=int(input("enter quantity:"))
s=20*a
print("your amount for milk is :",s,"\n")
elif(d==9):
print("you have ordered water: ")
a=int(input("enter quantity:"))
s=50*a
print("your amount for water is :",s,"\n")
elif(d==10):
print("you have ordered pasta:")
a=int(input("enter quantity:"))
s=100*a
print("your amount for pasta is :",s,"\n")
else:
print("please enter your choice from the menu")
def laundarybill():
global z
print("enter 1 :")
ch=int(input("enter your choice:"))
if ch==1:
sql="select * from laundary"
mycursor.execute(sql)
rows=mycursor.fetchall()
for x in rows:
print(x)
y=int(input("enter number of clothes:"))
z=y*50
print("your laundary bill is:",z,"\n")
return z
def Menuset():
print("enter 1: To enter customer data")
print("enter 2 : To view roomtype")
print("enter 3 : for calculating room bill")
print("enter 4 : for viewing restaurent menu")
print("enter 5 : for restaurant bill")
print("enter 6 :for laundary bill")
print("enter 7: for exit:")
try:
userinput=int(input("please select an above option:"))
except ValueError:
exit("\n hi thats not a number")
userinput=int(input("enter your choice"))
if(userinput==1):
registercust()
elif(userinput==2):
roomtypeview()
elif(userinput==3):
roomrent()
elif (userinput==4):
restaurantmenuview()
elif(userinput==5):
orderitem()
elif(userinput==6):
laundarybill()
elif(userinput==7):
quit()
else:
print("enter correct choice:")
Menuset()