PWP
PWP
PROJECT REPORT ON
“Text-Based Adventure Game”
Subject-Python Programming (314004)
SUBMITTED BY
1. Devgire Kasturi Ganesh[46]
2. Gawali Radhika Nitin [56]
Under the Guidance of
Mr. S.B. Jadhav
1
Sanjivani Rural Education Society’s
SANJIVANI K.B.P POLYTECHNIC
DEPARTMENT OF COMPUTER TECHNOLOGY
CERTIFICATE
This is to certify that the Project Report entitled
“Text-Based Adventure Game”
SUBMITTED BY
1.Devgire Kasturi Ganesh[46]
2.Gawali Radhika Nitin [56]
Under our supervision and guidance for partial fulfilment of the requirement for
Diploma in Computer Technology affiliated to
Maharashtra State Board of Technical Education,Mumbai for academic year
2024-2025
2
ACKNOWLEDGEMENT
The successful completion of this text-based adventure game project would not have
been possible without the generous support and guidance of several individuals. First and
foremost, we would like to express our deepest appreciation to our dedicated teacher, Mr.
S.B. Jadhav. He not only provided us with the exciting opportunity to engage in this hands-on
learning experience but also fostered an environment that encouraged exploration, critical
thinking, and the development of our programming skills. His insightful feedback and
consistent encouragement were truly invaluable throughout the entire project lifecycle.
We also extend our sincere gratitude to Dr. G. N. Jorvekar, the esteemed Head of the
Computer Department. His unwavering support and the provision of his expert guidance
played a crucial role in navigating the technical aspects of this project. His belief in our
abilities and his motivation spurred us to overcome challenges and strive for the best possible
outcome.
Furthermore, we are immensely thankful to the respected Principal, Prof. A. R. Mirikar, for
his commitment to providing students with the necessary infrastructure and resources.
Finally, we wish to acknowledge the collaborative spirit and unwavering support of our
friends and fellow team members. The exchange of ideas, mutual assistance in
troubleshooting, and shared enthusiasm made the journey of creating this game both
productive and enjoyable. Their willingness to lend a hand and offer different perspectives
significantly enriched the project.
3
INTRODUCTION
Rationalize:
This simple "Text-Based Adventure" game serves as an excellent introductory project for
understanding fundamental programming concepts in a fun and engaging way. This "Text-
Based Adventure" project provides a hands-on and enjoyable way to learn and reinforce
fundamental programming concepts such as sequential execution, conditional logic, user
input, and function usage.
Aim:
Benefits:
Text-Based Adventure" project provides a hands-on and enjoyable way to learn and reinforce
fundamental programming concepts such as sequential execution, conditional logic, user
input, and function usage. Its simplicity allows learners to grasp these concepts quickly while
also providing a creative outlet for potential expansion and further learning.
Literature Review
4
CONCLUSION
This mini-project successfully achieved its aim of creating a simple yet engaging
text-based adventure game using Python. By implementing core programming concepts such
as sequential execution, conditional logic through if/elif/else statements, user input handling,
and function definitions, the game provides a practical and accessible introduction to
fundamental programming principles.The process of developing this game has demonstrated
how these concepts can be applied to create interactive experiences, even in a text-based
format. While this project represents a basic implementation, it serves as a valuable stepping
stone for exploring more complex game development and programming concepts in the
future.
REFERENCE
● GeeksforGeeks-https://www.w3schools.com/python/python_intro.asp
● W3Schools-https://www.w3schools.com/python/
PROGRAM CODE
def start_adventure():
print("Welcome, brave adventurer!")
print("You find yourself standing at a crossroads.")
print("To the north, you see a dark and mysterious forest.")
print("To the east, there's a shimmering lake.")
print("To the west, you spot a tall, imposing mountain.")
print("What will you do?")
print("Enter 'north', 'east', or 'west' to choose your path.")
if choice == "north":
forest_path()
elif choice == "east":
lake_path()
elif choice == "west":
mountain_path()
else:
print("That's not a valid direction! Try again.")
start_adventure()
5
def forest_path():
print("\nYou enter the dark forest. The trees are tall and the air is still.")
print("You hear a rustling in the bushes. Do you:")
print("1. Investigate the noise")
print("2. Continue deeper into the forest")
if choice == "1":
print("\nYou cautiously approach the bushes and find a small, injured bird. You
decide to help it.")
print("The bird chirps gratefully and flies away. You feel a sense of
accomplishment.")
elif choice == "2":
print("\nYou continue deeper into the forest, but soon lose your way. After
wandering for hours, you find your way back to the crossroads.")
start_adventure()
else:
print("Invalid choice.")
forest_path()
def lake_path():
print("\nYou walk towards the shimmering lake. The water looks cool and
inviting.")
print("You see a small boat tied to a wooden post. Do you:")
print("1. Take the boat out for a row")
print("2. Go for a swim")
if choice == "1":
print("\nYou untie the boat and row out onto the lake. The view is beautiful and
peaceful.")
elif choice == "2":
print("\nYou jump into the cool water for a refreshing swim. It feels great!")
else:
print("Invalid choice.")
lake_path()
def mountain_path():
print("\nYou begin to climb the tall mountain. The path is steep and rocky.")
print("You find a shiny stone on the path. Do you:")
print("1. Pick it up")
print("2. Leave it there and keep climbing")
6
choice = input("> ")
if choice == "1":
print("\nYou pick up the shiny stone and put it in your pocket. It feels smooth
and cool.")
elif choice == "2":
print("\nYou leave the stone and continue your climb. The view from higher up
is amazing.")
else:
print("Invalid choice.")
mountain_path()
if __name__ == "__main__":
start_adventure()
OUTPUT:
You enter the dark forest. The trees are tall and the air is still.
You hear a rustling in the bushes. Do you:
1. Investigate the noise
2. Continue deeper into the forest
>1
You cautiously approach the bushes and find a small, injured bird. You decide to help
it.
7
The bird chirps gratefully and flies away. You feel a sense of accomplishment.
8
9