Skip to content

EngAnwarAlkhteeb/100-days-of-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

100-days-of-python

Treasure Island" is an engaging text-based adventure game written in Python. This interactive program invites players to navigate through a series of decisions and challenges on their quest to discover hidden treasure. The game begins at a crossroad, where players choose between left and right paths, each leading to different adventures.

Players must decide whether to swim across a lake or wait for a boat, facing unique consequences for each choice. The narrative unfolds further as players encounter a mysterious house with three colored doors—red, yellow, and blue. The outcomes of these choices determine whether the player wins the game or faces a perilous end.

The program is designed to be user-friendly, offering an entertaining and immersive experience for those seeking a quick and enjoyable Python project. Feel free to explore the code, contribute enhancements, or share your unique outcomes with the community!

The code :

print('''


      |                   |                  |                     |

|.="";=.||______ | | ,-",="" "=.| | |___________________|__"=._o"-. "=.______________|___________________ | "=.o"=._ _"=. | |:=.o "=..".-="'"=.| | | .--" , ; "=._o." ,-"""-._ ". | |___________________|_._" ,. . `` , "-."-. ". '|___________________ | |o"=._ , " ; .". , "-."-.; ; | || ;-.o"=.; ." '."` . "-. /| | | |o; "-.o"=.`` '" ,__.--o; | |___________________|_| ; (#)-.o `"=.`.--"o.-; ;|_________________ ///|o;. " `".o|o_.--" ;o;/// ////"=.o--. ; | ; ; ;//// ////"=.o--. ;o|o; .;o;/// /////"=.o.; | ;.--"o.--"//// /////"=.o|o_.--""////_ ///////////[TomekK]


''' ) print("Welcome To Treasure Island.") print("Your mission is to find the treasure.")

left_or_right = input( "You'r at the cross road. Where do you want to go? Type" + ' "left"' + " or" + ' "right"\n' )

if left_or_right.lower() == "left": swim_or_wait = input( "You come to a lake. There is an island in the middle of the lake. Type" + ' "wait"' + " to wait for a boat. Type" + ' "swim"' + " to swim across.\n" ) if swim_or_wait.lower() == "wait": door = input( "You arrive at the island unharmed. There is a house with 3 doors. One red, one yellow and one blue. Which colour do you choose?\n" ) if door.lower() == "yellow": print("You Win!") elif door.lower() == "red": print("Burned by fire. Game Over.") elif door.lower() == "blue": print("Eaten by beasts. Game Over.") else: print("Attacked by trout. Game Over.") else: print("Fall into a hole. Game Over.")

print("Thank you for playing.")

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published