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

Blackbox Python

Uploaded by

shimaa youssif
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)
6 views

Blackbox Python

Uploaded by

shimaa youssif
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/ 1

def main():

print("You find yourself standing in an open field, filled with grass and yellow wildflowers.")

print("Rumor has it that a wicked fairie is somewhere around here, and has been terrifying the nearby
village.")

print("There is a house to the north and a dark cave to the west.")

while True:

print("Enter 1 to knock on the door of the house.")

print("Enter 2 to peer into the cave.")

choice = input("What would you like to do?\n(Please enter 1 or 2): ")

if choice in ['1', '2']:

choice = int(choice)

break

else:

print("Invalid choice. Please enter 1 or 2.")

if choice == 1:

print("You approach the house and knock on the door.")

# Add story logic for knocking on the door

elif choice == 2:

print("You cautiously approach the cave and peer inside.")

# Add story logic for peering into the cave

if __name__ == "__main__":

main()

You might also like