Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that asks a user for his/her userid and password. The program tests the given userid and password against a file of userids

image text in transcribed
Write a program that asks a user for his/her userid and password. The program tests the given userid and password against a file of userids and passwords. The user gets three attempts to enter the information correctly. If the userid and password are correctly entered within three attempts, write a message to the screen informing the user that the userid and password were found. If not, write a message to the screen informing the user that the userid and password were not found. You can be as creative in your messages as you want, but no insulting comments. Users are sensitive creatures. Whenever a user enters an incorrect userid or password, you have to allow him/her to reenter a userid and password, assuming it is within the three tries. This means that you have to begin the search at the beginning of the file. You should have at least three functions: 1. An introduction intro that explains the process to the user 2. A function getInfo that gets the userid and password from the user; 3. A function checkFile passwords; checks the userid that opens the file of userids and and password entered by the user against the file of userids should close the file and return True, if the userid and and return False, if they are not found and passwords. This function password are found or close the file def main0: This function should call intro, keep track of the number of tries; call the other two functions; and print out an appropriate reply (this could also be a function). Remember to document your functions with appropriate comments after the function declaration Proofread your comments and statements to the user. Your program should run correctly and the dialogue (output on the screen) should be pleasing to the eye

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

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago