Question: Write a program to check the user s pin against the one stored in the pin ( password ) file Prompt the user for a

Write a program to check the users pin against the one stored in the pin (password) file
Prompt the user for a filename
Prompt the user up to 3 times to get the pin correct
If the file does not exist/cannot be read, print a message ('Could not open file - exiting'), and exit the program
If the user enters a pin that is not an integer, then print a message ('Pin is an integer')
Do NOT count this as one of the three attempts
Sample Run #1(bold, underlined text is what the user types):
Pin file? pin.txt
Pin? 3.5
Pin is an integer
Pin? apple
Pin is an integer
Pin? 1234
Pin? 5678
Pin? 3462
Note: This is an introductory level class and this problem is meant to be completed through a mixture of file inputs/outputs, and exceptions.

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!