Question: If user is not in users: 4 . 1 . Print out a message to let the customer know that he / she doesn t

If user is not in users:
4.1. Print out a message to let the customer know that he/she doesnt have an account with
the Bank.
4.2. Print out another message to ask the customer if he/she would like to have an account
with the bank. Convert the input to lower case with casefold() or lower() function.
4.2.1 If the first letter entered is not equal to y, print out an inspiring message to
encourage the customer to come back again, then exiting the program.
4.2.2 else ask the customer if he/she would like to enter 1 to create a pin or enter 2
to have the system create a new pin
4.2.2.1. The user gets 3 chances to pick a pin between 1 to 9999.
4.2.2.2. If the customer would like to have the system create a new pin, the system will
randomly create a pin between 1 to 9999
4.2.3 Save the new username and pin to users dictionary when the pin is successfully
created.
users[user]= pin
4.2.4 After the pin is created, display the following message:
4.2.5 Clear the output screen once the pin is created with os.system function.
5. Continue with the code we created in PE1 to ask the user (the existing user or the new
user) to enter the pin and make transactions. Please note: we will not code an else block
for the if statement coded in step 4.
5.1. In the users dictionary, now the pin is saved as an integer not a string. After we ask a
bank customer to
selection = input('Enter pin or x to exit application: ').casefold()
5.2. We first check to see if selection ==x. If that is true, use the keyword break to exit
the while loop if x is entered, as we coded in PE1.
5.3. If the bank customer entered the pin, we need to convert that to an integer since all
inputs collected from console are string.
Here is how we coded in PE1:
elif selection != pin :
We will change that to the following in PE2:
elif int(selection)!= users[user] :
Follow standard submission instructions (see course website Week 1-> Assignment
Help Guide... and then the Assignment Submission Instructions area).
Submit your [asurite]_transaction2.py only and do not submit a zip file submission.
Zip file submissions will only be requested for larger programs we create later in this course.
In the first portion of the course, you will be submitting the module only. Ensure you read
instructions carefully to ensure you submit correctly.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!