Question: For this assignment, you need to submit a Python program that gathers the following employee information according to the rules provided: Employee ID (this is
For this assignment, you need to submit a Python program that gathers the following employee information according to the rules provided:
- Employee ID (this is required, and must be a number that is 7 or less digits long)
- Employee ID MUST be a number. Characters and blank values are not valid. Provide code that continues to ask the user until a valid ID number is entered.
- Employee Name (this is required, and must be comprised of primarily upper and lower case letters. It also cannot contain any of the following characters: ! " @ # $ % ^ & * ( ) _ = + , < > / ? ; : [ ] { } \ ).
- Employee Name must not be a number or blank. Provide code that continues to ask the user until a valid name is entered.
- Employee Email Address (this is required, and must be comprised of primarily of alphanumeric characters. It also cannot contain any of the following characters: ! " ' # $ % ^ & * ( ) = + , < > / ? ; : [ ] { } \ ).
- Employee email must not be a number or blank. Provide code that continues to ask the user until a valid email is entered.
- Employee Address (this is not required, but if it is provided, it must be comprised primarily of alphanumeric characters. It cannot contain any of the following characters: ! " ' @ $ % ^ & * _ = + < > ? ; : [ ] { } ).
- Employee address must not be a number. Employee address can be blank.
- If no employee address was provided, insert the user address input as "You did not provide an address.'
- Allow up to 5 employees' worth of information.
- Allow the user to break out of the code before reaching 5 employee's worth of information.
- When a user enters improper data, the program asks the user to re-enter it before continuing on.
- Use while loops to eliminate redundant code, promote code re-use, and use functions to gather each piece of data.
- As employee information is added, create a list of dictionaries that hold all of the information. And the end of your program, print out the list.
- User output should be formatted in dictionary format.
- Example: ({'Employee ID': 1007, 'Employee Name': 'Jane Doe', 'Employee Email': 'email@mail.com', 'Employee Address': '123 Street Rd'}]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
