Question: Can you Utilize looping to make this script run constantly? while True: #Initialize list to store employees, information latEnployees [1 fInitialize liat to store employees'
while True: #Initialize list to store employees, information latEnployees [1 fInitialize liat to store employees' names only #The "counter" will be u ed as an index for the "IstEmployee" counter-0 #make use of, the while loop to add five employees while counter c5: "Istames " lists print (" print( print( #allow users to enter the employee Name, SSN, Phone, Email, and Salary name-input ('Enter employee name: #add employee name to the "IstNames" list 1stNames.insert (counter, name ssn-input ('Enter employee SSN: phone-input ('Enter employee phone no.: email-input ('Enter employee emaii:) salary#input ('Enter employee salary: $ ') line name+ssn+phonetemail t +salary #add the employee information to the "IstEmployees" list Ln") Number or tmployees (io:d))tomat (counteri) stEnployees.insert (counter, line) #increase the index by one counter countertl if (counter)>5: - #Whenusers finish adding the five required employees, prompt them to choose an emo break else: #Allos, users t print an employee record based on their index print (" print ("Entir to diaplaytolo),. nformation ".tornat (1atName o to))) print ("Encer 2 to dioplay (01a)o information".format (JatNameo(4)) crint 1"Enter diovia v 13), nformation ".forna tilstilainear21.) in
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
