Answered step by step
Verified Expert Solution
Question
1 Approved Answer
THE DIRECTIONS CALL FOR IF A DUPLICATE NAME IS FOUND A NEW USERNAME FORMAT IS NEEDED FOR THE ITEM THAT IS A DUPLICATE. NONE OF
THE DIRECTIONS CALL FOR IF A DUPLICATE NAME IS FOUND A NEW USERNAME FORMAT IS NEEDED FOR THE ITEM THAT IS A DUPLICATE. NONE OF THE PREVIOUS RESPONDERS ARE SOLVING THE PROBLEM!Python Program Input section: Instead of using a static list and the zip method you will receive input from the end user again this is you, LOL You will take that information and apply it to a list with the elements being tuples. You will ask for user input with the following question: What is your first name? What is your last name? What year were you born? Your program should ask the end user for at least employees and include at least employees that will cause a duplicate username that your new logic will correct. You will need to validate the data as to length. First and Last Name should be at least a length of Year of birth should be a length of but can remain a string. After each employee has entered their first name, last name and year of birth, you should display that information back out to the employee and ask them to confirm the information. If the employee answers Yes then update the employee data list with the information. If the employee answers No then clear the input variables and ask the questions again. After your program receives information on employees you will terminate the input process. Process section: With in a for in loop do the following: Use that information to create employee usernames in the following format: first initial last name year of birth i e Dale Fontenot dfontenot Use if else logic to test the new username to make sure it does not exist in the current username list. If it is a duplicate, do not append the username list but build a new username using the employee s first name all lower case and the first initial of the last name and then the year of birth, ie dalef After building the new username, append the username list with it If no duplicate is found, append the username to the username list. Store the usernames in a list Store the combined employee information in a dictionary with the username as the key and a tuple with first name, last name, year of birth. Make a copy of the username list without a copy loop and then sort that copy. Output section: You must then output the following information in this order: Username Today s Date Employee Data list that you used to gather user input Username list with all usernames Employee data dictionary Username list that has been sorted
THE DIRECTIONS CALL FOR IF A DUPLICATE NAME IS FOUND A NEW USERNAME FORMAT IS NEEDED FOR THE ITEM THAT IS A DUPLICATE. NONE OF THE PREVIOUS RESPONDERS ARE SOLVING THE PROBLEM!Python Program
Input section:
Instead of using a static list and the zip
method you will receive input from the end user
again this is you, LOL
You will take that information and apply it to a list with the elements being tuples. You will ask for user input with the following question:
What is your first name?
What is your last name?
What year were you born? Your program should ask the end user for at least
employees and include at least
employees that will cause a duplicate username that your new logic will correct.
You will need to validate the data as to length. First and Last Name should be at least a length of
Year of birth should be a length of
but can remain a string. After each employee has entered their first name, last name and year of birth, you should display that information back out to the employee and ask them to confirm the information. If the employee answers Yes then update the employee data list with the information. If the employee answers No then clear the input variables and ask the questions again. After your program receives information on
employees you will terminate the input process.
Process section:
With in a for in loop do the following:
Use that information to create employee usernames in the following format: first initial last name year of birth i
e
Dale Fontenot
dfontenot
Use if else logic to test the new username to make sure it does not exist in the current username list. If it is a duplicate, do not append the username list but build a new username using the employee
s first name
all lower case
and the first initial of the last name and then the year of birth, ie dalef
After building the new username, append the username list with it
If no duplicate is found, append the username to the username list.
Store the usernames in a list
Store the combined employee information in a dictionary with the username as the key and a tuple with first name, last name, year of birth. Make a copy of the username list without a copy loop and then sort that copy.
Output section:
You must then output the following information in this order:
Username
Today
s Date
Employee Data list that you used to gather user input
Username list with all usernames
Employee data dictionary
Username list that has been sorted
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started