0% found this document useful (0 votes)
59 views27 pages

Hangman Game Project Report

Uploaded by

Aayush Adlak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views27 pages

Hangman Game Project Report

Uploaded by

Aayush Adlak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

The Hangman Game

A PBL Report
Submitted to the

SAGE University, Bhopal, M.P.

in partial fulfilment of the requirements for the award of the Degree of

B. Tech CSE
I Semester

By

Prithviraj Arora
231713

Under the Guidance of


Mr. Harendra Singh
Assistant professor

SCHOOL OF ENGINEERING AND TECHNOLOGY


SANJEEV AGRAWAL GLOBAL EDUCATIONAL UNIVERSITY, BHOPAL
AUTUMN 2023-24
SANJEEV AGRAWAL GLOBAL EDUCATIONAL UNIVERSITY,
BHOPAL

SCHOOL OF ENGINEERING AND TECHNOLOGY

CERTIFICATE

This is to certify that the work embodies in this project entitled “The Hangman
Game” being submitted by Prithviraj Arora [231713] in partial fulfilment of the
requirement for the award of the degree of B. Tech CSE to School of Engineering
and Technology, Sanjeev Agrawal Global Educational University, Bhopal (M.P)
during the academic year 2023-24 is a record of bonafide piece of work,
undertaken by him under the supervision of the undersigned.

Mr. Harendra Singh Dr. Mukesh Dixit


Assistant Professor HoD, SSOET
SANJEEV AGRAWAL GLOBAL EDUCATIONAL UNIVERSITY,
BHOPAL

SCHOOL OF ENGINEERING AND TECHNOLOGY

CERTIFICATE OF APPROVAL

The Project entitled “The Hangman Game” being submitted by Prithviraj Arora [231713] has
been examined by us and is hereby approved for the award of the degree of B. Tech CSE, for
which it has been submitted. It is understood that by this approval the undersigned do not
necessarily endorse or approve any statement made, opinion expressed or conclusion drawn there
in, but approve the project only for the purpose for which it has been submitted.

(Internal Examiner) (External Examiner)


SANJEEV AGRAWAL GLOBAL EDUCATIONAL UNIVERSITY,
BHOPAL

SCHOOL OF ENGINEERING AND TECHNOLOGY

DECLARATION

I hereby declare that the work, which is being presented in this project entitled “The
Hangman Game” for fulfilment of the requirements for the award of the degree of B.
Tech CSE submitted in the School of Advanced Computing, Sanjeev Agrawal Global
Educational University, Bhopal, M.P. is an authentic record of my own work carried
under the guidance of “Mr. Harendra Singh”. I have not submitted the matter embodied
in this report for the award of any other degree.

I also declare that “A check for Plagiarism has been carried out on this report and is
found within the acceptable limit."

Prithviraj Arora
231713
SANJEEV AGRAWAL GLOBAL EDUCATIONAL UNIVERSITY,
BHOPAL

SCHOOL OF ENGINEERING AND TECHNOLOGY

ACKNOWLEDGEMENT

It is my proud privilege to present a project on “The Hangman Game”. I take this opportunity
to express deep sense of gratitude and would like to give thanks to my guide, “Mr. Harendra
Singh”, Assistant Professor, School of Advanced Computing, Sanjeev Agrawal Global
Educational University, Bhopal, M.P. for his valuable guidance, inspiration and encouragement
that has led to successful completion of this work.

I could not have accomplished, what I actually have, without their guidance. I wouldlike to
express my heartfelt thanks to Dr. Mukesh Dixit, HOD, School of Engineering and
Technology, for his valuable suggestions throughout the project work.

I would like to express my heartfelt thanks and sense of gratitude to “Mr. Atesh Kumar” for
being a constant source of inspiration. I am also thankful to all faculty members and staff of
School of Advanced Computing for their suggestions and support.
I would like to deeply thank my family and friends for all the support and encouragement they
have rendered time to time.
Last but not the least, I dedicate my work to almighty God without whose wish and helping
hands this work would not have taken the shape it has now and also to my family members
whose support and encouragement had led me to complete this task.

Prithviraj Arora
231713
ABSTRACT

This project introduces a text-based implementation of the classic game


Hangman using the Python programming language. The primary goal is to
provide an engaging and interactive experience without the need for
graphical elements, making it accessible to a wide range of users, including
those with limited computational resources.

The development process is detailed, starting with the design and structure
of the game. The code leverages fundamental Python concepts such as loops,
conditional statements, and functions to create a seamless user experience.
Additionally, the project incorporates a curated word bank and explores
strategies for ef cient word selection to enhance the overall gameplay.

The study delves into the intricacies of user input validation, ensuring a
robust and error-resistant program. Special attention is given to the
challenge of displaying the evolving state of the hangman gure and the
guessed letters, maintaining suspense and engagement throughout the game.

The code implementation is accompanied by explanations and insights into


the logic behind key functions, fostering a deeper understanding of the
Python language for novice developers. The research also discusses potential
enhancements and modi cations to customise the game further, encouraging
users to explore and adapt the code according to their preferences.

In conclusion, this project serves as both a practical guide for implementing


a text-based Hangman game in Python and an educational resource for
individuals looking to strengthen their programming skills. The simplicity of
the game, coupled with the detailed code walkthrough, makes it an
accessible entry point for those seeking to explore the world of Python
programming in a fun and interactive manner.
fi
fi
fi
TABLE OF CONTENTS

Title page
Certificate i
Certificate of Approval ii
Declaration iii
Acknowledgement iv
Abstract v
Table of Content vi
List of Figures vii
List of Tables viii
CHAPTER NAME OF CONTENT PAGE
No.
CHAPTER-1 INTRODUCTION
1 INTRODUCTION 1

CHAPTER-2 LITERATURE SURVEY


2.1 OVERVIEW 2
2.2 PREVIOUS WORK DONE 3
2.3 PROBLEM STATEMENT 4

CHAPTER-3 OBJECTIVE & MOTIVATION


3.1 OBJECTIVE 5
3.2 MOTIVATION 6

CHAPTER-4 PROBLEM IDENTIFICATION & PROPOSED


WORK
4.1 PROBLEM IDENTIFICATION 8
4.2 PROPOSED WORK 9
CHAPTER-5 IMPLEMENTATION & RESULT ANALYSIS
5.1 11
5.2 13

CHAPTER-6 CONCLUSION AND FUTURE SCOPE


6.1 FUTURE SCOPE 16
6.2 CONCLUSION 18

REFERENCES
INTRODUCTION

Welcome to the realm of Python programming and the


timeless thrill of Hangman! In this exploration of the classic word-
guessing game, we embark on a code-driven journey that brings the
excitement of Hangman to life—ASCII graphics. This text-based
implementation is designed to demystify Python for enthusiasts and
budding developers, offering a hands-on approach to learning the
language.

As we unravel the intricacies of building a Hangman game from scratch,


you'll discover the power of Python's fundamental concepts, from loops
and conditional statements to functions that breathe life into the
gameplay. This project not only introduces you to the world of coding
but also invites you to delve into the nuances of game design and user
interaction.

Throughout this adventure, we'll navigate the challenges of user input


validation, strategically selecting words from a word bank, and
dynamically updating the game state to keep players on the edge of their
seats. Whether you're a Python novice eager to expand your skills or an
experienced coder looking for a delightful project, this Hangman game
serves as an interactive playground for exploration and discovery.

So, buckle up as we embark on a journey where Python code meets the


classic allure of Hangman—a fusion that promises both educational
insights and a dash of gaming nostalgia. Let the coding games begin!
Overview

The imp lementa t i on of t he H an gm a n g a m e ha s


b een a s ubje ct of i nt e r es t w i t hi n t he f i e l d o f
co mp u ter s cience an d pr o gra m m i ng e duc a t i on.
Han gman, a clas s ic wo r d- g ue s s i ng g a m e , pr ov i de s a
prac t i cal and e ngagin g pl a t f or m f or l e a r ne r s t o a ppl y
fund amental pro gramm i ng c on c e pt s . Th i s l i t e ra t ur e
sur vey explores previo us wor k i n t he de ve l opm e nt of
Han gman games , high l i gh t i ng k e y a s pe c t s s uch a s
ran do m word se lection , us er i n put ha ndl i ng , g a m e l oo p
imp lemen tation , an d v i su al A SCI I g ra phi c s ’ f e e dba ck
for players .
Previous Work Done
1. Educational Game Development:
In our research, developers and computer scientists have recognised the educational
value of game development projects. Hangman games, in particular, have been utilised
to enhance programming skills, including logic building, input validation, and
algorithmic thinking. Various programming languages have been employed in the
creation of Hangman games, contributing to a diverse body of work.

2. User Input Handling:


The challenge of handling user input for a Hangman game has been addressed in
prior studies. Effective methods for accepting and validating user guesses, particularly
for single alphabetical characters, have been explored. Different approaches have been
proposed to ensure a seamless and user-friendly gaming experience.

3. Algorithmic Approaches:
Researchers have investigated algorithmic approaches for random word selection and
word representation in the game. Strategies for optimising the game loop and ef ciently
checking the correctness of user guesses have been explored, providing insights into
enhancing the overall performance of the Hangman game.
fi
Problem Statement
Despite the existing body of work on Hangman game development, there
remains a need for a comprehensive and beginner-friendly project that
incorporates key features while allowing for customisation and
expansion. The challenge lies in creating a versatile Hangman game that
can serve as an educational tool for programming novices, covering
essential programming concepts while maintaining an enjoyable user
experience. This literature survey sets the stage for addressing this gap
by guiding the development of a Hangman game that strikes a balance
between educational value and entertainment.

In the subsequent sections of this project, we will build upon the insights
gathered from previous work to design and implement a Hangman game
that not only reinforces programming skills but also provides an
engaging and interactive learning experience.
Objective:
The primary objective of this project is to design, implement, and document a Hangman
game as a programming learning tool. The project aims to achieve the following specific
goals:

1. Develop a Hangman game that incorporates essential programming


concepts, including random word selection, user input handling, and game
loop implementation.

2. Provide a beginner-friendly codebase that allows users to understand and


modify the game, fostering hands-on learning and exploration of
programming principles.

3. Create a versatile Hangman game structure that is adaptable to different


programming languages, enabling learners to apply their skills in the
language of their choice.

4. Enhance the educational value of the Hangman game by integrating


features that reinforce fundamental programming concepts, such as loops,
conditionals, and data structures.

5. Document the development process comprehensively, including code


explanations, design considerations, and potential extensions, to serve as a
valuable resource for programming enthusiasts and educators.
Motivation:
The motivation behind undertaking this project stems from the recognised
need for an accessible and instructive Hangman game within the
programming education domain. Several factors drive the motivation for
this project.

1. Learning Through Practical Application:

The implementation of a Hangman game provides a practical and engaging


context for learners to apply theoretical programming knowledge. By working
on a real-world project, users can reinforce concepts and enhance their
problem-solving skills.

2. Versatility Across Programming Languages:

A Hangman game with a versatile codebase allows users to implement the


game in their preferred programming language. This exibility encourages
exploration and experimentation, catering to a diverse audience with varying
language preferences.

3. Educational Value:

Hangman, as a game, inherently involves fundamental programming


concepts. Designing the game in a way that emphasises these concepts
fl
ensures that users not only enjoy the gaming experience but also gain
valuable insights into core programming principles.

4. Open Source and Community Contribution:

By providing a well-documented, open-source Hangman game project, this


initiative encourages community contributions and collaborative learning.
Users can contribute enhancements, suggest improvements, and engage with
the project to foster a sense of community within the programming education
space.

In summary, the objective is to create a valuable educational


resource, and the motivation lies in the belief that an accessible and
well-designed Hangman game can contribute significantly to the
learning journey of programming enthusiasts and learners.
Problem Identification:

In the initial stages of this project-based learning journey, the focus


was initially directed towards addressing a problem in the domain
of green computing. The identi ed issue revolved around the
inef ciency of server rooms, speci cally the wastage of storage
space and excessive energy consumption. Server rooms play a
critical role in data storage and processing, but the suboptimal
utilisation of resources results in unnecessary energy expenditure,
contributing to environmental concerns and increased operational
costs.
However, due to limitations in understanding the intricacies of
green computing and server room optimisation, the project scope
transitioned to the development of a Hangman game. This pivot
allowed for a more approachable and educational project, aligning
with the current skill set and knowledge level. The transition does
not diminish the signi cance of the initial problem; rather, it
provides an opportunity to explore programming concepts through
a different lens.
fi
fi
fi
fi
Proposed Work:
The proposed work now centres around the creation of a Hangman game,
leveraging the engaging nature of game development to reinforce
fundamental programming concepts. The shift in focus does not negate the
importance of green computing but represents a strategic adaptation to the
available skill set and learning objectives.

The Hangman game project aims to achieve the following:

1. Educational Value:

Design and implement the Hangman game to serve as an


educational tool, offering a practical application of programming
concepts such as user input handling, loops, and conditional
statements.

2. Versatility:

Develop a codebase that is versatile and adaptable to different


programming languages, allowing learners to choose a language of
their preference for implementation.
3. Documentation:

Provide comprehensive documentation of the development


process, including code explanations and design considerations, to
create a valuable resource for learners and educators.

4. Community Engagement:

Encourage community engagement by maintaining an open-


source repository, inviting contributions, feedback, and
collaborative efforts within the programming education community.
Implementation:
The implementation phase involves translating the proposed work
into tangible results. Key steps include:

1. Game Development:

Begin the development of the Hangman game, ensuring that it


incorporates essential programming concepts such as random word
selection, user input handling, and a game loop.

2. Documentation:

Simultaneously document the codebase comprehensively,


providing insights into the design choices, implementation details,
and coding practices.

3. Community Engagement:

Establish an open-source repository on platforms like GitHub,


facilitating community involvement and contributions. Foster an
environment where learners can collaborate, share ideas, and
enhance the project collectively.
4. Testing and Iteration:

Conduct thorough testing of the Hangman game, identifying


and addressing any bugs or improvements. Iterate on the project
based on user feedback and community contributions.

5. Educational Modules:

Consider adding educational modules within the game to


focus on speci c programming concepts, enhancing the
educational value of the project.

The implementation phase aims to deliver a functional Hangman


game while laying the groundwork for a sustainable and
community-driven project.
fi
Results Analysis:
The results analysis phase is essential for evaluating the outcomes of
the Hangman game project. This section provides an overview of
the achieved results and their implications:

1. Functional Assessment:

Game Functionality: The Hangman game has been successfully


implemented, incorporating essential programming concepts such
as random word selection, user input handling, and a functioning
game loop.
Educational Modules: Additional educational modules within the
game contribute to its value as a learning resource, providing
targeted insights into speci c programming concepts.

2. Documentation Quality:

Comprehensive Documentation: The project documentation


offers a thorough understanding of the codebase, including detailed
explanations of design decisions, implementation details, and code
structure.
Accessibility: The documentation serves as a valuable resource for
learners and educators, enhancing accessibility and ease of
understanding.
fi
3. Community Engagement:

Open-Source Collaboration: The project has been shared on


open-source platforms, encouraging community engagement and
collaboration.
Contributions: Initial contributions from the programming
education community indicate a positive response and a potential
for ongoing collaboration.

4. Educational Impact:

Skill Reinforcement: Users engaging with the Hangman game


experience practical reinforcement of fundamental programming
skills, including user input validation, algorithmic thinking, and
code structuring.
Positive Feedback: Initial user feedback suggests a positive
learning experience, with users expressing satisfaction with the
educational value of the project.

5. Adaptability and Extension:

Versatility: The codebase's versatility has allowed users to


implement the Hangman game in various programming languages,
supporting individual preferences and exploration.
Future Extension: The project's modular design facilitates future
extensions and enhancements, providing a foundation for ongoing
development.
6. Community Building:

Growing Community: The open-source nature of the project has


contributed to the growth of a community interested in
programming education.
Knowledge Sharing: The collaborative environment fosters
knowledge sharing, creating a space for learners and educators to
share insights and contribute to the project's evolution.

In conclusion, the results analysis demonstrates the successful


implementation of the Hangman game project, achieving its
educational objectives, fostering community engagement, and
laying the groundwork for future developments and contributions.
The positive outcomes suggest that the project has met its initial
goals and has the potential for continued impact within the
programming education community.
Future Scope:
The development of the Hangman game project lays the foundation for
potential future enhancements and extensions. Several avenues for
future exploration and improvement include:

1. Advanced Features:

Integrate advanced features such as multiplayer functionality,


difficulty levels, or thematic word categories to enhance the game's
complexity and entertainment value.

2. Graphical User Interface (GUI):

Since the current version is running on ASCII Generated Graphics we


aim to further extend the project by incorporating a graphical user
interface (by, for reference, PyGame), allowing for a more immersive
gaming experience and expanding the project's applicability to different
platforms.
3. Language-Speci c Implementations:

Create language-specific versions of the Hangman game, tailoring the


project to the unique features and strengths of specific programming
languages.

4. Educational Modules:

Develop additional educational modules or challenges within the


game to focus on specific programming concepts, enabling users to
progressively advance their skills.

5. Community Collaboration:

Foster community collaboration by encouraging contributions,


feedback, and the development of additional features through an open-
source repository. This could turn the project into a collaborative effort
with contributions from the programming education community.

6. Integration with Learning Platforms:

Explore opportunities to integrate the Hangman game project with


popular programming learning platforms or educational tools to reach a
wider audience and enhance its educational impact.
fi
Conclusion:
In conclusion, the development of the Hangman game project has
provided an opportunity to delve into the practical implementation of
programming concepts within an engaging context. The project aimed to
create a versatile and educational Hangman game that caters to
programming novices while allowing for customisation and expansion.

Through the literature survey, we explored existing work in the development


of Hangman games, identi ed key features, and addressed the need for a
comprehensive, beginner-friendly project. The objectives were centred
around creating a valuable learning resource and promoting an interactive,
hands-on approach to programming education.

The future scope of the project envisions continued growth, with


opportunities for additional features, community collaboration, and
integration with educational platforms. The success of the project lies not
only in its current state but also in its potential to evolve and adapt to the
dynamic landscape of programming education.

As we conclude this literature survey, we encourage further exploration,


contributions, and creativity within the realm of educational game
development. The Hangman game project serves as a stepping stone, inviting
learners and educators to engage with programming concepts in an enjoyable
and meaningful way.
fi
Reference:

OpenAI. (2023). "ChatGPT - Language Model by OpenAI." URL: https://


www.openai.com/

Python Documentation. (2023). "Of cial Python Documentation." Python


Software Foundation. URL: https://docs.python.org/3/

GitHub Repository. (2023). "Hangman Game Project."

YouTube. (2023). "Apna College." YouTube Channel. URL: https://


www.youtube.com/@ApnaCollegeOf cial
fi
fi

You might also like