Connor's school

mail@pastecode.io avatar
unknown
plain_text
a month ago
3.4 kB
2
Indexable
Never
import time

def intro():
    print("Welcome to Pico's School Adventure!")
    time.sleep(1)
    print("You are Pico, a student at a school filled with chaos.")
    time.sleep(1)
    print("Your goal is to navigate through the school and survive the day.")
    time.sleep(1)
    print("Are you ready? Let's begin!\n")
    time.sleep(1)

def school():
    print("\nYou are inside the school building.")
    time.sleep(1)
    print("You can go to the cafeteria, the classroom, or the principal's office.")

def cafeteria():
    print("\nYou enter the cafeteria.")
    time.sleep(1)
    print("Do you want to grab some food or look for your friends?")
    choice = input("Type 'food' to grab food or 'friends' to look for your friends: ").lower()
    if choice == "food":
        print("\nYou grab some food and eat it quickly.")
        time.sleep(1)
        print("Suddenly, you hear a loud noise coming from the hallway.")
        time.sleep(1)
        print("You decide to investigate.")
    elif choice == "friends":
        print("\nYou look around the cafeteria but don't see your friends.")
        time.sleep(1)
        print("Suddenly, you hear a loud noise coming from the hallway.")
        time.sleep(1)
        print("You decide to investigate.")

def classroom():
    print("\nYou enter your classroom.")
    time.sleep(1)
    print("The teacher is writing on the board and the other students are busy with their work.")
    time.sleep(1)
    print("Do you want to talk to the teacher or sit at your desk?")
    choice = input("Type 'talk' to talk to the teacher or 'sit' to sit at your desk: ").lower()
    if choice == "talk":
        print("\nYou approach the teacher and ask for help with your assignment.")
        time.sleep(1)
        print("The teacher helps you and you feel relieved.")
    elif choice == "sit":
        print("\nYou quietly sit at your desk and focus on your work.")

def principal_office():
    print("\nYou arrive at the principal's office.")
    time.sleep(1)
    print("The principal is busy on the phone.")
    time.sleep(1)
    print("Do you want to wait or knock on the door?")
    choice = input("Type 'wait' to wait or 'knock' to knock on the door: ").lower()
    if choice == "wait":
        print("\nYou wait for a few minutes until the principal finishes the call.")
        time.sleep(1)
        print("The principal notices you and asks how they can help you.")
    elif choice == "knock":
        print("\nYou knock on the door and the principal asks you to come in.")
        time.sleep(1)
        print("You explain your situation to the principal and they offer their assistance.")

def main():
    intro()
    while True:
        school()
        choice = input("Where do you want to go? (cafeteria/classroom/principal's office): ").lower()
        if choice == "cafeteria":
            cafeteria()
        elif choice == "classroom":
            classroom()
        elif choice == "principal's office":
            principal_office()
        else:
            print("Invalid choice. Please try again.")

        play_again = input("Do you want to continue exploring the school? (yes/no): ").lower()
        if play_again != "yes":
            print("Thanks for playing!")
            break

if __name__ == "__main__":
    main()
Leave a Comment