28 CT XXXXXXXXXXPYPIndividual Assignment ONLINE CAR RENTAL SYSTEM (OCRS) SUPER CAR RENTAL SERVICES (SCRS) is one of the fast-growing Online Car Rental Service in Malaysia which help customer to save...

1 answer below »

View more »
Answered 3 days AfterJun 11, 2021

Answer To: 28 CT XXXXXXXXXXPYPIndividual Assignment ONLINE CAR RENTAL SYSTEM (OCRS) SUPER CAR RENTAL SERVICES...

Rushendra answered on Jun 15 2021
153 Votes
py_code/.pytest_cache/.gitignore
# Created by pytest automatically.
*
py_code/.pytest_cache/CACHEDIR.TAG
Signature: 8a477f597d28d172789f06886806bc55
# This file is a cache directory tag created by pytest.
# For information about cache directory tags, see:
#    http://www.bford.info/cachedir/spec.html
py_code/.pytest_cache/README.md
# pytest c
ache directory #
This directory contains data from the pytest's cache plugin,
which provides the `--lf` and `--ff` options, as well as the `cache` fixture.
**Do not** commit this to version control.
See [the docs](https://docs.pytest.org/en/stable/cache.html) for more information.
py_code/.pytest_cache/v/cache/stepwise
[]
py_code/.vscode/settings.json
{
"python.testing.pytestArgs": [
"."
],
"python.testing.unittestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.unittestArgs": [
"-v",
"-s",
".",
"-p",
"*_test.py"
]
}
py_code/Admin_Data.txt
bob:123
dave:ch123
py_code/DisplayCars_Data.txt
SUV:Honda:Red:2013:70
suv:nissan:red:2010:30
Sports:Lamborghini:Yellow:2015:40
SUV:Honda:White:2019:30
py_code/main.py
import datetime
def main():
time = datetime.datetime.now()
print("""
_______
// ||\ \\
_____//___||_\ \___
) _ _ \\
|_/ \________/ \___|
___\_/________\_/______
""")
print("\n\tWELCOME TO CAR RENTAL SHOP!\n")
print(f"\tCurrent date and time: {time}")
while True:
print("""
******** Car Rental Shop ********
1. Admin
2. Unregistered Customer
3. Registered Customer
4. Exit the program
""")
try:
choice = int(input("Enter your choice: "))
except ValueError:
print("Please enter a number!")
continue
if choice == 1:
admin()
elif choice == 2:
unregistered_function()
elif choice == 3:
registered_function()
elif choice == 4:
break
else:
print("Please enter a choice between 1-4 only!")
def login(user, password, elevated):
with open("User_Data.txt" if not elevated else "Admin_Data.txt", "r") as text:
print("%s Login ********" % ("******** Admin" if elevated else "******** User"))
for record in text:
recordList = record.rstrip().split(":")
if user.lower() in recordList[0].lower() and password in recordList[1]:
print("Welcome, %s" % user)
return True
print("Error! Wrong username or password")
return False
def admin():
nValue = input("Enter username: ")
pValue = input("Enter password: ")
if login(nValue, pValue, True):
admin_function()
def searchCarBooking():
f=False
x=int(input("Enter id"))
for i in list_customer_cars:
if(i.id==x):
f=True
i.display()
if(f==False):
print("No record Found")
def searchCarPayment():
f=False
x=int(input("Enter id"))
for i in list_customer_cars:
if(i.id==x and i.confirm==True):
f=True
i.display()
if(f==False):
print("No record Found")
def admin_function():
while True:
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here
March
January
February
March
April
May
June
July
August
September
October
November
December
2025
2025
2026
2027
SunMonTueWedThuFriSat
23
24
25
26
27
28
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
1
2
3
4
5
00:00
00:30
01:00
01:30
02:00
02:30
03:00
03:30
04:00
04:30
05:00
05:30
06:00
06:30
07:00
07:30
08:00
08:30
09:00
09:30
10:00
10:30
11:00
11:30
12:00
12:30
13:00
13:30
14:00
14:30
15:00
15:30
16:00
16:30
17:00
17:30
18:00
18:30
19:00
19:30
20:00
20:30
21:00
21:30
22:00
22:30
23:00
23:30