Giter Site home page Giter Site logo

100-days-of-python's Introduction

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.")

100-days-of-python's People

Contributors

enganwaralkhteeb avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.