Background
You are the IT officer for a tech startup and you are in charge of onboarding new employees. You need the employee details to set up an account for them on the company network. You are building a platform to collect their details and you have to do some basic validation.
Tasks
-
Collect details first name, last name, email.
-
Generate random password for the user joining the first 2 letters of the first name and last 2 letters of the last name, with a random string of length 5. This makes your password 9 letters long.
-
Show user password and ask if he or she is satisfied with it. If yes, print out user details nicely from the container and that’s the end of the program, if no, ask user to choose a password himself.
-
If user inputs password, make sure it is longer than 7 characters before ending the program and printing out user details. If it is less than 7, prompt user to input a new password equal to or greater than 7 in length.
-
Create a container for user data such that if the program is run consecutively by two different users, their details get stored in your container (make sure you can identify who has each detail). Print out each item in the container after all users are done.