Question

In: Computer Science

IN PYTHON When you use an automated teller machine (ATM) with your bank card, you need...

IN PYTHON

When you use an automated teller machine (ATM) with your bank card, you need to use a personal identification number (PIN) to access your account. If a user fails more than three times when entering the PIN, the machine will block the card. Assume that the user’s PIN is “1234” and write a program that asks the user for the PIN no more than three times, and does the following:

•If the user enters the right number, print a message saying, “Your PIN is correct”, and end the program.

•If the user enters a wrong number, print a message saying, “Your PIN is incorrect” and, if you have asked for the PIN less than three times, ask for it again.

•If the user enters a wrong number three times, print a message saying “Your bank card is blocked” and end the program.

Solutions

Expert Solution

PIN = 1234 # user PIN
attempt = 3 # maximum number of attempts

input_PIN = int (input ("Enter Your PIN : ")) # taking PIN from user
attempt -= 1 # decrement the number of attempts after every input

while (attempt > 0) : # Run the while loop until user enters correct PIN or exceeds maximum attempts
  
if (input_PIN == PIN) : # if PIN is correct then exit from loop
print("Your PIN is correct")
break
  
if (input_PIN != PIN) : # if PIN is incorrect then decrement the number of attempts
print("Your PIN is incorrect")
input_PIN = int (input ("Enter Your PIN : "))
attempt -= 1
  
if (attempt == 0) : # if user exceeds maximum attempts then block the card
print("Your bank card is blocked")


Related Solutions

When you use an automated teller machine (ATM) with your bank card, you need to use...
When you use an automated teller machine (ATM) with your bank card, you need to use a personal identification number (PIN) to access your account. If a user fails more than three times when entering the PIN, the machine will block the card. Assume that the user's PIN is "1234" and write a program in python that asks the user for the PIN no more than three times, and does the following: 1. If the user enters the right number,...
A bank operates an automated teller machine (ATM) in which users provide a personal identification number...
A bank operates an automated teller machine (ATM) in which users provide a personal identification number (PIN) and a card for account access. Give examples of confidentiality, integrity, and availability requirements associated with the system and indicate the degree of importance of each requirement. Short Essay Question
Consider requirements and technology for an analysis of an Automated Teller Machine (ATM) design. Type an...
Consider requirements and technology for an analysis of an Automated Teller Machine (ATM) design. Type an outline out for an ATM system design using the below HCI criteria. Use eye-tracker data to further analyze the product Consider accessibility (universal usability) issues such as lighting, physical placement of ATM, etc. Consider user profile issues, e.g. is this the first time a user is using an ATM? Requirement to perform beta and/or market tests? Are there other stress factors such as a...
CASE Study: A Report on Global ATM Frauds The Automatic Teller Machine (ATM) was first commercially...
CASE Study: A Report on Global ATM Frauds The Automatic Teller Machine (ATM) was first commercially introduced in the 1960s. By 2005, there were over 1.5 million ATMs installed worldwide. The introduction of the ATM proved to be an important technological development that enabled financial institutions to provide services to their customers in a 24X7 environment. The ATM has enhanced the convenience of customers by enabling them to access their cash wherever required from the nearest ATM. However, as the...
1. This programming assignment will involve the idea of modern-day banking using an automated teller machine...
1. This programming assignment will involve the idea of modern-day banking using an automated teller machine (ATM). The server-side software maintains a bank account and a user accesses the account via client software. For this program, you can assume that a single account will be accessed by a single user. This avoids synchronization problems with multiple users. There must be two sides to this program: a server and a client. The server maintains the balance and does all updates (withdrawals...
To gain access to his account, a customer using an automatic teller machine (ATM) must enter...
To gain access to his account, a customer using an automatic teller machine (ATM) must enter a 6-digit code ( 0 to 9). If repetition of the same digit is not allowed (for example, 555561 or 333333), how many possible combinations are there?(The first digit can not be zero) a)151200 b)136080 c)1,000,000 d)900,000
E-Teller manufactures ATM machines. Recently the company has begun manufacturing and marketing a machine that can...
E-Teller manufactures ATM machines. Recently the company has begun manufacturing and marketing a machine that can recognize customer fingerprints. Demand for this machine is very strong, and the chief executive officer of E-Teller is considering dropping production of the company’s original model, which relies on bankcards and passwords. This will give the company increased capacity to devote to the new model. Which of the following items are relevant to the CEO’s decision to drop the old model machine? a. The...
Code C++ language description about Automated teller machine that can check balance, Deposit and Withdraw money
Code C++ language description about Automated teller machine that can check balance, Deposit and Withdraw money
Rock Solid Bank and Trust (RSB&T) offers only checking accounts. Customers can write checks and use a network of automated teller machines.
Rock Solid Bank and Trust (RSB&T) offers only checking accounts. Customers can write checks and use a network of automated teller machines. RSB&T earns revenue by investing the money deposited; currently, it averages 5.2 percent annually on its investments of those deposits. To compete with larger banks, RSB&T pays depositors 0.5 percent on all deposits. A recent study classified the bank’s annual operating costs into four activities.ActivityCost Driver CostDriver VolumeUsing ATMNumber of uses$1,500,000 2,000,000usesVisiting branchNumber of visits 900,000 150,000visitsProcessing transactionNumber...
At Acme Bank the total amount of money that customers withdraw from an automatic teller machine...
At Acme Bank the total amount of money that customers withdraw from an automatic teller machine (ATM) each day is believed to be normally distributed with a mean of $8600 and a variance of 6250000. i) At the beginning of weekday (M-F), the Acme Bank puts $10000 into the automatic teller machine. What is the probability that the ATM becomes empty before the end of the day. ii) How much should the Acme Bank put in the ATM each day...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT