Cs Investigatory
Cs Investigatory
CERTIFICATE
This is to certify that SRIMAN.R of Class XII B of Kendriya
Vidyalaya AFS Sulur School has completed the Computer
Science Investigatory Project entitled “RESORT
MANAGEMENT” in the school Computer Science lab.
PRINCIPAL SIGN:
ACKNOWLEGEMENT
I FEEL EXTREMELY ELATED ON COMPLETION OF THIS PROJECT. I
INTRODUCTION
Python is a high-level, general-purpose programming
language. Its design philosophy emphasizes code
readability with the use of significant indentation.
class hotelfarecal:
ab=random.randint(100,400)
def
__init__(self,rt='',s=0,p=0,r=0,t=0,tp=0,a=1800,name='',address='',ci
ndate='',coutdate='',rno=ab,subject=''):
self.rt=rt
self.r=r
self.t=t
self.subject=subject
self.p=p
self.tp=tp
self.s=s
self.a=a
self.name=name
self.address=address
self.cindate=cindate
self.coutdate=coutdate
self.rno=rno
def inputdata(self):
print()
print("Your room no.:",self.rno)
if(x==1):
self.s=6000*n
elif (x==2):
self.s=5000*n
elif (x==3):
self.s=4000*n
elif (x==4):
print ("you have opted Economy class AC")
self.s=3000*n
else:
def themepark(self):
print('>>>>Theme Park Pacakages<<<<')
print('1.Diamond Package : ₹1599 /Person')
print('❖ All water rides\n❖ All dry rides\n❖ Free Unlimited
Food\n❖ Access to 9D shows and Games\n❖ Free Access of Music
concert')
print()
print('2.Platinum Package: ₹1199/Person')
print('❖ All water rides\n❖ All dry rides\n❖ Limited Food\
n❖ Access to 9D shows')
print()
print('3.Golden Package: ₹999 /Person')
print('❖ All water rides\n❖ All dry rides\n❖ Access to 9D
shows')
if (t==1):
print('You Have Opted for Diamond Package')
self.tp=1599*tn
elif (t==2):
print('You Have Opted for Platinum Pakage')
self.tp=1199*tn
elif (t==3):
print('You Have Opted for Golden Pakage ')
self.tp=999*tn
else:
print('Please select a Pakage')
print('You Total Theme Park Bill is=','₹',self.tp,'\n')
def restaurentbill(self):
print("*****RESTAURANT MENU*****")
print("1.Cooldrink----->₹20\n2.tea----->₹20\n3.Arabian
combo--->₹150\n4.Indian Combo---->₹150\n5.Chineese Combo---
>Rs180\n6.European Combo----->₹250\n7.Mixed Combo----->₹350\
n8.Exit")
while (1):
if (c==1):
d=int(input("Enter the quantity:"))
self.r=self.r+20*d
elif (c==2):
d=int(input("Enter the quantity:"))
self.r=self.r+20*d
elif (c==3):
d=int(input("Enter the quantity:"))
self.r=self.r+150*d
elif (c==4):
d=int(input("Enter the quantity:"))
self.r=self.r+150*d
elif (c==5):
d=int(input("Enter the quantity:"))
self.r=self.r+180*d
elif (c==6):
d=int(input('Enter the quantity:'))
self.r=self.r+250*d
elif (c==7):
d=int(input('Enter the quantity:'))
self.r=self.r+350*d
elif(c==8):
break
else:
print('Invalid Option')
def laundrybill(self):
print ("******LAUNDRY MENU*******")
while (1):
if (e==1):
f=int(input("Enter the quantity:"))
self.t=self.t+5*f
elif (e==2):
f=int(input("Enter the quantity:"))
self.t=self.t+6*f
elif (e==3):
f=int(input("Enter the quantity:"))
self.t=self.t+8*f
elif (e==4):
f=int(input("Enter the quantity:"))
self.t=self.t+7*f
elif (e==5):
f=int(input("Enter the quantity:"))
self.t=self.t+8*f
elif (e==6):
break
else:
while (1):
if (g==1):
h=int(input("No. of hours:"))
self.p=self.p+80*h
elif (g==2):
h=int(input("No. of hours:"))
self.p=self.p+120*h
elif (g==3):
h=int(input("No. of hours:"))
self.p=self.p+110*h
elif (g==4):
h=int(input("No. of hours:"))
self.p=self.p+150*h
elif (g==5):
h=int(input("No. of hours:"))
self.p=self.p+200*h
elif (g==6):
break
else:
def display(self):
print ("******HOTEL BILL******")
print ("Customer details:")
print ("Customer name:",self.name)
print ("Customer address:",self.address)
print ("Check in date:",self.cindate)
print ("Check out date",self.coutdate)
print ("Room no.",self.rno)
print ("Your Room rent is:",'₹',self.s)
print("Your Theme Park Bill is:",'₹',self.tp)
print ("Your Food bill is:",'₹',self.r)
print ("Your laundary bill is:",'₹',self.t)
print ("Your Game bill is:",'₹',self.p)
self.rt=self.s+self.t+self.p+self.r+self.tp
def sendbill(self):
f=open('prshotelbill.txt','w')
msg= f"""\
***** PRS STAR HOTELS *****
Name:{self.name}
Bill No:11524894
checkout date:{self.cindate}
Room Rent:Rs.{self.s}
WRITER=msg
f.write(WRITER)
f.close()
email_from = "[email protected]"
email_list =input('Enter Customer gmail:')
pswd = "loyessckkfkbllul"
body= f"""
Hi {self.name},
Successfully paid the amount ₹{self.rt+self.a} to PRS Star
Hotels through cash.
You can refer our hotel and earn money using your
referal code. B982K12 !!!
Code validity is for 3 months.
ThankYou for spending your time with us, Visit Again!
msg = MIMEMultipart()
msg['From'] =formataddr(('PRS Hotels limited','email_from'))
msg['To'] = email_list
msg['Subject'] = self.subject
msg.attach(MIMEText(body, 'plain'))
filename = "prshotelbill.txt"
attachment= open(filename,'r')
text = msg.as_string()
print("Connecting to server...")
server = smtplib.SMTP(smtp_server, smtp_port)
server.starttls()
server.login(email_from, pswd)
print("Succesfully connected to server")
print()
server.quit()
elif ch==2:
cn=int(input('Enter your card no:'))
am=self.rt+self.a
bank=input('Enter Bank Name:')
smtp_port = 587
smtp_server = "smtp.gmail.com"
email_from = "[email protected]"
email_list =input('Enter Customer gmail:')
pswd = "loyessckkfkbllul"
body= f"""
Hi {self.name},
Successfully paid the amount ₹{am} to PRS Star Hotels
from your {bank} card from card no.{cn}
₹{am} credited from your {bank} bank account
ThankYou for spending your time with us, Visit Again!
msg = MIMEMultipart()
msg['From'] =formataddr(('PRS Hotels limited','email_from'))
msg['To'] = email_list
msg['Subject'] = self.subject
msg.attach(MIMEText(body, 'plain'))
filename = "prshotelbill.txt"
attachment= open(filename,'r')
text = msg.as_string()
print("Connecting to server...")
server = smtplib.SMTP(smtp_server, smtp_port)
server.starttls()
server.login(email_from, pswd)
print("Succesfully connected to server")
print()
server.quit()
elif ch==4:
gn=input('Enter Cheque Id:')
amx=self.rt+self.a
bank=input('Enter Bank Name:')
y=input('Enter (ok) if Customer signed cheque:')
y=y.lower()
if y=='ok':
print('Amount successfully paid!!!')
smtp_port = 587
smtp_server = "smtp.gmail.com"
email_from = "[email protected]"
email_list =input('Enter Customer gmail:')
pswd = "loyessckkfkbllul"
body= f"""
Hi {self.name},
Successfully paid the amount ₹{amx} to PRS Star Hotels
from Cheque no.{gn}
{bank} accepted your cheque payment!!!
ThankYou for spending your time with us, Visit Again!
msg = MIMEMultipart()
msg['From'] =formataddr(('PRS Hotels limited','email_from'))
msg['To'] = email_list
msg['Subject'] = self.subject
msg.attach(MIMEText(body, 'plain'))
filename = "prshotelbill.txt"
attachment= open(filename,'r')
text = msg.as_string()
print("Connecting to server...")
server = smtplib.SMTP(smtp_server, smtp_port)
server.starttls()
server.login(email_from, pswd)
print("Succesfully connected to server")
print()
server.quit()
elif ch==3:
google=int(input('Enter Google Pay Id:'))
amount=self.rt+self.a
print('Amount','₹',amount,'succesfully Transferd to PRS
Hotels Hotel')
dis=int((amount/100)*3)
print('Cashback ₹',dis,'to the coustomer!!!')
smtp_port = 587
smtp_server = "smtp.gmail.com"
email_from = "[email protected]"
email_list =input('Enter Customer gmail:')
pswd = "loyessckkfkbllul"
body= f"""
Hi {self.name},
Successfully paid the amount ₹{amount} to PRS Star
Hotels from your GooglePay no.{google}
₹{dis} credited to your Google Pay account as a
discount!!!
ThankYou for spending your time with us, Visit Again!
msg = MIMEMultipart()
msg['From'] =formataddr(('PRS Hotels limited','email_from'))
msg['To'] = email_list
msg['Subject'] = self.subject
msg.attach(MIMEText(body, 'plain'))
filename = "prshotelbill.txt"
attachment= open(filename,'r')
attachment_package = MIMEBase('application', 'octet-
stream')
attachment_package.set_payload((attachment).read())
encoders.encode_base64(attachment_package)
attachment_package.add_header('Content-Disposition',
"attachment; filename= " + filename)
msg.attach(attachment_package)
text = msg.as_string()
print("Connecting to server...")
server = smtplib.SMTP(smtp_server, smtp_port)
server.starttls()
server.login(email_from, pswd)
print("Succesfully connected to server")
print()
server.quit()
def main():
a=hotelfarecal()
while (1):
print()
print("8.EXIT")
if (b==2):
a.themepark()
if (b==3):
a.restaurentbill()
if (b==4):
a.laundrybill()
if (b==5):
a.gamebill()
if (b==6):
a.display()
if (b==7):
a.sendbill()
if (b==8):
quit()
print('Visit again')
main()
OUTPUT