0% found this document useful (0 votes)
2 views

Source Code

The document is a Python script for a rental service called Rentstitute Inc., allowing customers to rent cars, gowns, or establishments. It includes image processing for displaying items, user input for selection, and pricing based on daily rates, with discounts for longer rentals. The script features a loop for continuous interaction until the user decides to exit.

Uploaded by

urTurtle
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Source Code

The document is a Python script for a rental service called Rentstitute Inc., allowing customers to rent cars, gowns, or establishments. It includes image processing for displaying items, user input for selection, and pricing based on daily rates, with discounts for longer rentals. The script features a loop for continuous interaction until the user decides to exit.

Uploaded by

urTurtle
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

import PIL

from PIL import Image

from colorama import Fore

car1 = Image.open('car1.webp')

car1.thumbnail((500,500))

car2 = Image.open('car2.jpg')

car2.thumbnail((500,500))

car3 = Image.open('car3.jpg')

car3.thumbnail((500,500))

car4 = Image.open('car4.jpg')

car4.thumbnail((500,500))

car5 = Image.open('car5.jpg')

car5.thumbnail((500,500))

gown1 = Image.open('ballgown.webp')

gown1.thumbnail((500,500))

gown2 = Image.open('trumpetgown.jpg')

gown2.thumbnail((500,500))

gown3 = Image.open('column gown.jpg')

gown3.thumbnail((500,500))

gown4 = Image.open('Alinegown.jpg')

gown4.thumbnail((500,500))

gown5 = Image.open('mermaid gown.jpg')

gown5.thumbnail((500,500))

estab1 = Image.open('estab1.jpg')
estab1.thumbnail((500,500))

estab2 = Image.open('estab2.jpg')

estab2.thumbnail((500,500))

estab3 = Image.open('estab3.jpg')

estab3.thumbnail((500,500))

estab4 = Image.open('estab4.jpg')

estab4.thumbnail((500,500))

estab5 = Image.open('estab5.jpg')

estab5.thumbnail((500,500))

estab6 = Image.open('estab6.webp')

estab6.thumbnail((500,500))

red = Fore.RED

cyan = Fore.CYAN

mage = Fore.MAGENTA

yellow = Fore.LIGHTYELLOW_EX

green = Fore.LIGHTGREEN_EX

blue = Fore.LIGHTBLUE_EX

white = Fore.LIGHTWHITE_EX

while True:

print()

print(f"{yellow}..••°°°°••.. Hello customer! Welcome to Rentstitute


Inc. ..••°°°°••..")

item = str(input(f"""What would you like to rent

{blue}> Car
{mage}> Gown

{cyan}> Establishment

{red}> Exit

{green}Enter your choice:{white} """ ))

print(" ")

if item == "Car":

while True:

print(f"{blue}What car would you like to rent")

print()

print("""1. Ford Bronco 4 Door Outer Banks SUV 2023

2. Hyundai Accent SE Sedan 2017

3. BMW 1-Series 135i Convertible 2011

4. Buick Encore SUV 2016

5. Lexus ES 350 F Sport Sedan 2020""")

print(" ")

carnum = int(input("Enter the number of the car that you would like
to rent: "))

print(" ")

if carnum == 1:

car1.show()

print("Please look at the photo provided for reference")

print("The daily rate for this particular car is ₱1550 per day")

print()

itempr = 1550
yn = str(input(f"Would you like to proceed with processing this
rent?{green}(Yes|{red}No):{blue} "))

elif carnum == 2:

car2.show()

print(f"{blue}Please look at the photo provided for reference")

print("The daily rate for this particular car is ₱1530 per day")

print()

itempr = 1530

yn = str(input(f"Would you like to proceed with processing this


rent?{green}(Yes|{red}No):{blue} "))

elif carnum == 3:

car3.show()

print(f"{blue}Please look at the photo provided for reference")

print("The daily rate for this particular car is ₱2350 per day")

print()

itempr = 2350

yn = str(input(f"Would you like to proceed with processing this


rent?{green}(Yes|{red}No):{blue} "))

elif carnum == 4:

car4.show()

print(f"{blue}Please look at the photo for provided reference")

print("The daily rate for this particular car is ₱1770 per day")

print()

itempr = 1770

yn = str(input(f"Would you like to proceed with processing this


rent?{green}(Yes|{red}No):{blue} "))

elif carnum == 5:

print(f"{blue}Please look at the photo provided for reference")


print("The daily rate for this particular car is ₱2170 per day")

print()

itempr = 2170

yn = str(input(f"Would you like to proceed with processing this


rent?{green}(Yes|{red}No):{blue} "))

else:

print(f"{red} ☒Invalid Input! Please select again☒")

continue

if yn == "Yes":

print("Amazing!!")

print()

break

if yn == "No":

yesno = str(input(f"Do you want to continue checking the other


cars?{green}(Yes|{red}No):{blue} "))

print()

if yesno == "No":

print("We will now re-route you to our main menu")

print()

break

elif item == "Establishment":

while True:

print (f"{cyan}What type of Establishment: ")

print()

print ("""1. Coffee Shop


2. Pavilion

3. Mall Stall

4. Restaurant

5. Warehouse

6. Inn

""")

print()

estnum = int(input("Please select an Establishment you want to rent:


"))

print(" ")

if estnum ==1:

estab1.show()

print(f"{cyan}Please look at the photo provided for reference.")

print("The daily rate for this particular Establishment is ₱2100.")

print(" ")

itempr = 2100

yn = str(input(f"Would you like to proceed with processing this


rent?{green}(Yes|{red}No):{cyan} "))

elif estnum ==2:

estab2.show()

print(f"{cyan}Please look at the photo provided for reference.")

print("The daily rate for this particular Establishment is ₱3300.")

print(" ")

itempr = 3300

yn = str(input(f"Would you like to proceed with processing this


rent?{green}(Yes|{red}No):{cyan} "))
elif estnum ==3:

estab3.show()

print(f"{cyan}Please look at the photo provided for reference.")

print("The daily rate for this particular Establishment is ₱1110.")

print(" ")

itempr = 1110

yn = str(input(f"Would you like to proceed with processing this


rent?{green}(Yes|{red}No):{cyan} "))

elif estnum ==4:

estab4.show()

print(f"{cyan}Please look at the photo provided for reference.")

print("The daily rate for this particular Establishment is ₱3600.")

print(" ")

itempr = 3600

yn = str(input(f"Would you like to proceed with processing this


rent?{green}(Yes|{red}No):{cyan} "))

elif estnum ==5:

estab5.show()

print(f"{cyan}Please look at the photo provided for reference.")

print("The daily rate for this particular Establishment is ₱4300.")

print(" ")

itempr = 4300

yn = str(input(f"Would you like to proceed with processing this


rent?{green}(Yes|{red}No):{cyan} "))

elif estnum ==6:


estab6.show()

print(f"{cyan}Please look at the photo provided for reference.")

print("The daily rate for this particular Establishment is ₱500.")

print(" ")

itempr = 500

yn = str(input(f"Would you like to proceed with processing this


rent?{green}(Yes|{red}No):{cyan} "))

else:

print(f"{red}☒Invalid Input! Please select again☒")

print(" ")

continue

if yn == "Yes":

print("Amazing!")

print(" ")

break

if yn == "No":

nnn = str(input(f"Do you want to check the other options


available? {green}(Yes|{red}No):{cyan} "))

print(" ")

if nnn == "No":

print("We will now re-route you to our main menu")

print(" ")

break

elif item == "Gown":

while True:
print(f"{mage}What gown would you like to rent")

print()

print("""1. Ballgown

2. Trumpet

3. Column

4. A-Line

5. Mermaid""")

print(" ")

gownnum = int(input("Enter the number of the gown that you would


like to rent: "))

print(" ")

if gownnum == 1:

gown1.show()

print("Please look at the photo provided for reference")

print("The daily rate for this particular gown is ₱ 500 per day")

print(" ")

itempr = 500

yn = str(input(f"Would you like to proceed with processing this


rent?{green}(Yes|{red}No):{mage} "))

elif gownnum == 2:

gown2.show()

print("Please look at the photo provided for reference")

print("The daily rate for this particular gown is ₱ 600 per day")

print(" ")

itempr = 600

yn = str(input(f"Would you like to proceed with processing this


rent?{green}(Yes|{red}No):{mage} "))
elif gownnum == 3:

gown3.show()

print("Please look at the photo provided for reference")

print("The daily rate for this particular gown is ₱ 700 per day")

print(" ")

itempr = 700

yn = str(input(f"Would you like to proceed with processing this


rent?{green}(Yes|{red}No):{mage} "))

elif gownnum == 4:

gown4.show()

print("Please look at the photo provided for reference")

print("The daily rate for this particular gown is ₱ 800 per day")

print(" ")

itempr = 800

yn = str(input(f"Would you like to proceed with processing this


rent?{green}(Yes|{red}No):{mage} "))

elif gownnum == 5:

gown5.show()

print("Please look at the photo provided for reference")

print("The daily rate for this particular gown is ₱ 900 per day")

print(" ")

itempr = 900

yn = str(input(f"Would you like to proceed with processing this


rent?{green}(Yes|{red}No):{mage} "))
else:

print(f"{red}Invalid Input! Please select again")

print(" ")

continue

if yn == "Yes":

print("Amazing!")

print(" ")

break

if yn == "No":

yesno = str(input(f"Do you want to continue checking other


gowns?{green}(Yes|{red}No):{mage} "))

print(" ")

if yesno == "No":

print("We will now re-route you to our main menu")

print(" ")

break

elif item == "Exit":

yeno = "No"

break

else:

print(f"{red}☒Invalid Input! Please select again.☒")

print(" ")

continue
if yn == "No":

continue

print(f"{white}How many days would you like to rent this item?")

while True:

try:

print(" ")

days = int(input(f"{white}Please enter the amount of days here:


{white} "))

print(" ")

if days <= 0:

raise Exception

except ValueError:

print("☒Please enter a number. Try again☒")

continue

except Exception:

print("☒Please enter a positive number. Try again☒")

continue

else:

if days >= 7:

print(f"{white}Congratulations! You received a 10% discount")

price = itempr - (itempr*0.10)

fprice = price * days

else:

fprice = itempr * days

break
print(f"{white}You would need to pay ₱{fprice} to succesfully finish this
transaction.")

print(" ")

yeno = str(input(f"{white}Would you like to finalize with processing this


rent?{green}(Yes|{red}No):{white} "))

print(" ")

if yeno == "Yes":

print("·͙*̩̩͙˚̩̥̩̥*̩̩̥͙ Congratulations!! You succesfully rented the item*̩̩̥͙˚̩̥̩̥*̩̩͙‧͙")

rint(" ")

print(f"{white}Please come to our physical store in the next 2 hours


to receive the item or the keys for the establishmentf")

print(" ")

yn2 = str(input(f"{white}Do you want to process renting another


item?{green}(Yes|{red}No):{white} "))

if yn2 == "Yes":

continue

else:

break

else:

yepno = str(input(f"{white}Would you like to startover the renting


process{green}(Yes|{red}No):{white} "))

print(" ")

if yepno == "No":

break

else:

print(f"{white}We would now re-route you to the main menu")

print(" ")

continue
if yeno == "Yes":

print(f"{white} ▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄ Thank you for renting with us!! Have


the most pleasent rest of your day ▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄")

else:

print(f"{white} ▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄ Thank for using this system. Have a


great day! ▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄")

You might also like