Week 1 Interactive Assignment Python Variables
CPT200: Fundamentals of Programming Languages
Dr. Amjad Alkilani
March 4, 2021
Screenshot of running program
Variables Used In Program
employeeName = This variable is used to store in employee name
employeeSSN = This variable is used to store in employee SSN
employeeNumber = This variable is used to store in employee numbe
employeeEmail = This variable is used to store in employee email
employeeSalary = This variable is used to store in employee salary
This program is used to prompt user employee information and display the information
Code:
employeeName = input("Enter name: ")
employeeSSN = input("Enter SSN: ")
employeeNumber = int(input("Enter phone number: "))
employeeEmail = input("Enter email: ")
employeeSalary = float(input("Enter salary: "))
print("\n--------------------------------")
print("Name: "+employeeName)
print("SSN: "+employeeSSN)
print("Phone Number: "+str(employeeNumber))
print("Email: "+employeeEmail)
print("Salary: $"+str(employeeSalary))
print("--------------------------------")
Use a basic list structure to enhance Functionality 1 that you developed in Week 1. You should allow users to enter information for five employees at the same time, where the first employee information entry is saved in index [0] and the second entry is saved in index [1], and so on. You want to make sure to enforce the user to enter the following employee information: employeeName, employeeSSN, employeePhone, employeeEmail, employeeSalary. After the user finishes entering the last employee information, they should get a message to allow them to print specific employee information from the saved list. The user can enter values between 1 and 5, where 1 will return the employee information saved in the list index [0], 2 will return the employee information saved in the list index [1] and so on. The printed result should be in the following format:
Mike Smith, 123123, XXXXXXXXXX, XXXXXXXXXX,$6000
Once you have completed Functionality 2, you must provide the following in a Word document and submit it through the Waypoint grading system:
· One screen shot of the completed functionality.
· An explanation of how you used variables and functions to employ the list data structure to allow users to enter information for five employees at the same time.
· A
ief description of the purpose of this functionality.
· The script for this functionality.