Question: Problem: You are an administrator of a computer system and are always required to create usernames and passwords automatically. There are rules for you
Problem: You are an administrator of a computer system and are always required to create usernames and passwords automatically. There are rules for you to create a username and a password for a user account. The rules for creating a username for an account are: the first character of a person's first name + the person' last name + the order number for the person. The rules for creating a password are: The password must have a minimum of eight characters The password must have at least one lowercase character. The password must have at least one uppercase character. The password must have at least one numeric character. The password may contain one or more special characters. The only special characters that are accepted are: " Underscore () Exclamation point (!) Dollar sign ($) At sign (@) Pound sign (#) Percent sign (%) Notes: The length of the username and password is also limited by your system (Windows or Macs). The password should be created randomly. Task: Write down a piece of Python script to create 50 persons' usernames (the 50 persons' information is stored in "person.txt"). Each person has his/her own account and each account has its own password. Please save the created usernames and passwords in one file so that you can use them in the future. Submit the scripts and the output file (where the accounts' usernames and passwords are stored in a file with the following format: order number, first name, last name, username, and password. See the sample output file: user_sample.txt). (Notes: you need to use open file, read file and write to file)
Step by Step Solution
There are 3 Steps involved in it
To create 50 persons usernames and passwords in Python and save them to a file we can use the following steps Open the persontxt file and read the contents into a list Create a new list to store the g... View full answer
Get step-by-step solutions from verified subject matter experts
