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

What Am I Doing

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

What Am I Doing

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

What am I doing

Today?
Hangman game in Python
Project description
In this project, we are developing a hangman game using Python. The game
allows users to guess a randomly selected word, letter by letter. Players are
given a clue to help them correctly guess the word. They have a limited
number of guesses, but every time they guess a letter incorrectly, they are
losing a guess. The game continues until players guess the entire word or run
out of guesses. This project is very useful because we can practice
programming logic, the use of control structures and the implementation of
functions in Python.

P H O
Used Tools
To do this project, we were using two tools that are very
essential and important for any programmer: Python and
Visual Studio Code.
Python
How do
What is it? What is it for?
we use it?
Python is a computer We can use Python to In our project, we use Python as
programming language that create a variety of programs the main language to develop
the hangman game. Taking
we are using to create because it is a general-
advantage of Python capabilities
websites and software, purpose language, not that allow us to handle game
automate tasks, and specialized in any specific logic, user input and display
perform data analysis. problem. output, making it more
interactive.
Visual Studio Code
How do
What is it? What is it for?
we use it?
Is a source code editor With this editor, developers We are using this editor to
developed by Microsoft, can write, debug, and edit write and debug the code
known for its versatility code efficiently in multiple for the Hangman game in
and extensive support for development environments. Python, taking advantage
multiple programming of its intuitive interface and
languages. advanced development
tools.
0100 0110 1101 0100
0100 1110

Code
Explanation
Libraries and Data
In this section, we import essential libraries for
the operation of the program. For example, the
random library is crucial for selecting “random”
words, while other libraries provide additional
functions necessary for various operations.
Additionally, we define a set of default words
that the program will use during execution.

Code fragment
Main function of the
game
We define the main function of the game, which
handles logic, handles user input, and updates
the game state. It is essential since it allows the
user to play, interacting with the game through
letter entries and seeing how the game
progresses.

Code fragment
Option menu
By creating this menu, the user can choose to
play, add words, change settings, or exit and
finish the game if they wish. This with the
purpose of providing a better experience, being
interactive and customizable.

Code fragment
Game cycle and Word
evaluation
In the main function, a loop was established so
that letters can be entered until the word is
completed or attempts are exhausted. They are
also evaluated so that numbers or the same
character are not allowed to be entered

1 3 8
4 5
Code fragment
3 4 3
9
Code documentation

We are continuously documenting the code,


using comments and clear descriptions to
explain each function and process. This is
important because it allows other people to
follow and understand the project. Additionally,
we can use the code for future reference and
ensure that anyone who reviews it can easily
understand what is written.

##
Code fragment
Execution and testing

You always have to constantly be running and


testing the code to make sure it works correctly
and has no errors. This is important because it
allows us to identify possible errors and correct
them effectively. However, it can be challenging
to identify all errors on the first test, so it is
important to perform many tests with different
conditions.
Complete code
Code Execution
Conclusion
Finally, today we have created a hangman game in Python, using
Visual Studio Code. Documenting our code and constantly testing
the program to make sure it works. Thanks to this project, we can
improve our programming skills and ensure that others understand
and can use our work. In ADSO it is like that.
Thanks!

CREDITS: This presentation template was created by Slidesgo, including icons by


Flaticon, and infographics & images by Freepik

You might also like