class Superstar:
def __init__(self, title, function):
self.title = title
self.function = function
self.relationships = {}
self.career_progress = 0
def change_role(self, new_role):
self.function = new_role
print(f"{self.title} is now a {self.function}!")
def add_relationship(self, movie star, relation):
self.relationships(movie star.title) = relation
print(f"{self.title} is now {relation} with {movie star.title}.")
def create_celebrity():
title = enter("Enter the movie star's title: ")
print("Select a job: Actor/Actress, Musician, Mannequin, Influencer")
function = enter("Function: ")
return Superstar(title, function)
def predominant():
print("Welcome to Superstar Life Simulator!")
movie star = create_celebrity()
whereas True:
print(f"{movie star.title} as a {movie star.function}.")
motion = enter("What would you love to do? (change function / add relationship / give up): ").decrease()
if motion == "change function":
new_role = enter("Enter new function: ")
movie star.change_role(new_role)
elif motion == "add relationship":
friend_name = enter("Enter the title of the movie star to attach with: ")
relation = enter("Enter relationship kind (pal, rival, and so forth.): ")
pal = Superstar(friend_name, "Undefined Function") # placeholder for different movie star
movie star.add_relationship(pal, relation)
elif motion == "give up":
break
else:
print("Invalid motion. Please attempt once more.")
if __name__ == "__main__":
predominant()