Answer:
The code will be in Python3
you will have to enter the number of employee data and it will display all the data entered in the correct format.
Explanation:
class Solution:
def __init__(self):
self.firstName=""
self.lastName=""
self.employeeID=0
def getData(self):
self.firstName=input("please enter your first name: ")
self.lastName=input("please enter your last name: ")
self.employeeID=input("please enter your ID: ")
def showData(self):
p="{}\t{}\t{}".format(self.firstName,self.lastName,self.employeeID)
return p
num=int(input("please enter the number of employee data you want to enter: "))
data=[]
for i in range(num):
t1=Solution()
t1.getData()
data.append(t1.showData())
for i in data:
print(i)