0% found this document useful (0 votes)
28 views

Python Code

This document contains code for an employee management system with the following functions: add employee data to a list, view all employee data, search for an employee by name, and exit the program. The code prints a menu and uses a while loop to repeatedly get user input to call the appropriate function until the user selects the exit option.

Uploaded by

garv saha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Python Code

This document contains code for an employee management system with the following functions: add employee data to a list, view all employee data, search for an employee by name, and exit the program. The code prints a menu and uses a while loop to repeatedly get user input to call the appropriate function until the user selects the exit option.

Uploaded by

garv saha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

#PROJECT CODE

print("**********Employee Management System*********")

l=[]

def view_list():

for i in l:

print("\nname-->{i[0]} DOB-->{i[1]} Gmail-->{i[2]}")

def add_data():

while True:

x=input("\nenter your name ,\nenter DOB , \nenter Gmail").split)(",")

l.append(x)

y=input("Do you want to add more records yes/no :")

if y=='yes':

pass

else:

break

def search_data():

name=input("\n enter the name to search ")

for i in l:

if name==i[0]:
print("Employee Name Found")

print("\nname-->{i[0]} DOB-->{i[1]} Gmail-->{i[2]}")

break

else:

print("Employee not found")

def end():

print("\n please enter key to exit ")

exit()

while True:

print("____________________________")

print(" ")

print("Please choose any option :")

print("\n1.Add data")

print("2.View data")

print("3.Search data")

print("4.exit")

ch=input("\nenter the option ")

if ch=='1':

add_data()

elif ch=='2':

view_list()

elif ch=='3':

search_data()
elif ch=='4':

end()

else:

print("wrong input")

You might also like