class Superstar:
def __init__(self, title, position):
self.title = title
self.position = position
self.relationships = {}
self.career_progress = 0
def change_role(self, new_role):
self.position = new_role
print(f"{self.title} is now a {self.position}!")
def add_relationship(self, celeb, relation):
self.relationships[celebrity.name] = relation
print(f"{self.title} is now {relation} with {celeb.title}.")
def create_celebrity():
title = enter("Enter the celeb's title: ")
print("Select a job: Actor/Actress, Musician, Mannequin, Influencer")
position = enter("Position: ")
return Superstar(title, position)
def essential():
print("Welcome to Superstar Life Simulator!")
celeb = create_celebrity()
whereas True:
print(f"{celeb.title} as a {celeb.position}.")
motion = enter("What would you love to do? (change position / add relationship / stop): ").decrease()
if motion == "change position":
new_role = enter("Enter new position: ")
celeb.change_role(new_role)
elif motion == "add relationship":
friend_name = enter("Enter the title of the celeb to attach with: ")
relation = enter("Enter relationship sort (good friend, rival, and so forth.): ")
good friend = Superstar(friend_name, "Undefined Position") # placeholder for different celeb
celeb.add_relationship(good friend, relation)
elif motion == "stop":
break
else:
print("Invalid motion. Please strive once more.")
if __name__ == "__main__":
essential()