Question: list, read from file into list and then read from list to screen Description A password log file ITWorks_password_log.txt has been provided withthe date/time and
list, read from file into list and then read from list to screen Description
A password log fileITWorks_password_log.txt has been provided withthe date/time and reason the password is invalid. Read the data from the file into a list. Using the list output each line. As you output each line from the list, count the number of errors for passwords that were below the minimum length and count the number of passwords that were above the maximum length. Output the counts to the screen.
Inputs
| Name | Description | Data Type | Source |
| ITWorks_password_log.txt | File containing the date/time and reason the password is invalid | string | file |
Processing
Read the contents of the password log file and add this to a list
Use the list to output each line and count of the number of errors for passwords that were below the minimum length and a count of the number of passwords that were above the maximum length.
Display both counts to the screen
Outputs
| Name | Description | Data Type | Destination |
| line | Contents of each line in the list | String | Screen |
| count_pw_too_small | This is the count of how many passwords were below the minimum length | integer | Screen |
| count_pw_too_large | This is the count of how many passwords were above the maximum length | integer | Screen |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
