users={}
class User:
def init(self,first_name,last_name,email,password,status=“inactive”):
self.first_name=first_name
self.last_name=last_name
self.email=email
self.password=password
self.status=status
def display(self):
return (f"\nDisplay the all users: …\n\nFirst name:{self.first_name}\nLast_name: {self.last_name}\nEmail: {self.email}\nPassword: {self.password}\nStatus: {self.status}\n-----------------")
def user_create():
first_name=input('enter the first name: ')
last_name=input("enter the last name: ")
email=input("enter the email: ")
password=input("enter the password: ")
print(“the user is added successfuly”)
return User(first_name,last_name,email,password)
n=0
while True:
print(“welcome to user management”)
choice=input(“”"
1.Add new user
2.Display all users
3.Exit\n\nEnter your choice: “”")
if choice==“1”:
user = user_create()
n+=1
user_display=user.display()
users[n]=user_display
elif choice==“2”:
for x in users:
print(users[x])
elif choice==“3”:
print(“Exit…”)
break
else:
print("invalid choice please try again ")