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 times to get the pin correct
If the file does not existcannot 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 #bold underlined text is what the user types:
Pin file? pin.txt
Pin?
Pin is an integer
Pin? apple
Pin is an integer
Pin?
Pin?
Pin?
Note: This is an introductory level class and this problem is meant to be completed through a mixture of file inputsoutputs and exceptions.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
