Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You have been hired by Python Auto Leasing to develop a new console interface. The interface can be accessed by authorized users only so the

You have been hired by Python Auto Leasing to develop a new console interface. The interface can be accessed by authorized users only so the user will have to create a userid and password. Your program will have 3 Python Lists: user IDs, passwords and available balances (see below). These lists will be populated with only 1 element, initially. The lists will grow as new users create an account. All three lists are in synchronization, so the index number of a user in "userList" must be used to locate the user's password and balance in the other lists. 1) Place a header with your name, date, and purpose of this program (summarize what the program is supposed to do; do not copy and paste the entire instructions) 2) Your program should display "Welcome to Python Auto Lease" when accessed by a user. 3) The following are the requirements to verify user's credentials: a) prompt the user to select 1=Login or 2=New Account b) use "input validation" to ensure the user types 1 or 2 c) the program must display "Invalid option, please try again" until a valid option is entered 4) Once the option is validated: d) if option was New Account, prompt the user to enter his/her Last Name. e) insert the last name into userList f) set the password using this formula: pwd = pwdList[-1] + (pwdList[-1] % 11) g) insert that pwd into pwdList h) display a message to the user "Your user name is {user} and password is {pwd}" h1) insert 0 in the balance list i) if option is Login: j) prompt the user for user id k) use "input validation" to ensure the user id exists in the userList l) the program must display "Invalid User Id, please try again" until a valid user id is entered m) once the user id is validated, prompt the user for a password o) use "input validation" to ensure the password matches the user Id (remember to save the index number obtained from the user id list) p) the program must display "Invalid password, please try again" until a valid password is entered 5) once the account is created or the login is validated: q) prompt the user to select l=Lease a car; p=Purchase Insurance; e=Exit r) use input validation to ensure that the user enters either "l" or "p" s) the program must keep prompting the user until a correct option is entered 6) if option is "l": t) prompt the user for a car maker u) prompt the user for a car model v) display a message "You've slected a {maker} {model}" w) display a second message "The price is $100 per day." x) prompt the user for "How many days?" y) set the user balance by multiplying the number of days by 100 7) if option is "p": z) display "Insurance costs $50 for all car models" aa) adjust the balance of the user by adding 50 to the current value in the balance list 8) the program must repeat steps q-aa until the user enters "e" to exit the program 9) when the user exits: ab) display "Your balance is {balance}; We'll send you a bill." ac) display "Thank you! Good bye." Place these Lists at the top of your program: userList = ["tech"] pwdList = [123] balance = [0]

Please screen shot the code in your compiler so I can see how you tabbed everything, Thank you!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Heikki Topi, Jeffrey A Hoffer, Ramesh Venkataraman

13th Edition

0134773659, 978-0134773650

More Books

Students also viewed these Databases questions