python aat report
python aat report
WORDLE GAME
USING PYTHON PROGRAMMING
Bachelor of Engineering
in
Electronics and communication Engineering
Submitted by:
Name roll no
MITHUN V 05
MOHAMMAD YASIR 06
MOHAMMED ALI 07
MOHAMMED HASSAN JAWAD 08
DECLARATION
We, Mithun. V, Mohammad Yasir, Mohammed Ali, Mohammed Hassan Jawad, the students of
1st Semester, B.E, Department of Electronics and Communication, BMS College of Engineering,
Bangalore, hereby declare that, this AAT Project entitled "WORDLE GAME USING PYTHON
PROGRAMMING" has been carried out in Department of ECE, BMS College of Engineering,
Bangalore during the academic semester October 2024 – January 2025. We also declare that to
the best of our knowledge and belief, the AAT Project report is not from part of any other report
by any other students.
1. MITUHN V
2. MOHAMMAD YASIR
3. MOHAMMED ALI
4. MOHAMMED HASSAN JAWAD
BMS COLLEGE OF ENGINEERING
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING
CERTIFICATE
This is to certify that the AAT Project titled “WORDLE GAME USING PYTHON
PROGRAMMING” has been carried out by MITHUN. V, MOHAMMAD YASIR,
MOHAMMED ALI, MOHAMMED HASSAN JAWAD during the academic year 2024-2025.
1 Introduction 1
3 Design 3
4 Source code 6
5 Results 11
6 References 13
1. INTRODUCTION
The Wordle Python is an engaging text-based game designed to test players' vocabulary and
problem-solving skills through an interactive guessing challenge.
Inspired by the popular word-guessing game ‘wordle’, this project allows players to select from
four exciting categories: car brands, anime names, marvel characters and country names. The
game provides a fun and educational experience while encouraging logical thinking and pattern
recognition.
In this game, players are given eight chances to guess the hidden word by entering one letter at a
time. Correct guesses reveal the letter's position in the word without deducting chances, while
incorrect guesses reduce the remaining opportunities. Hints, such as the word's length, guide
players, adding an element of strategy to the game.
This project demonstrates essential Python programming concepts, such as input handling,
conditional logic, loops, and randomization. The modular design includes a feature for replaying
the game, ensuring repeatability and user engagement. Ideal for beginners, the Wordle Python
Project blends entertainment with skill-building, making it both fun and educational.
1|Page
2. HARDWARE AND SOFTWARE REQUIREMENT
Hardware requirement
Processor: Any modern processor (Intel Core i3 or equivalent) is sufficient.
RAM: At least 2 GB of RAM, though 4 GB or more is recommended for smooth
multitasking.
Storage: Less than 1 MB of disk space for the script, with 10–20 MB for Python installation.
Display: A standard monitor or screen resolution (1024x768 or higher).
Input Devices: A keyboard for interacting with the game.
Software requirement
Operating System:
Windows 7 or later
macOS 10.10 or later
Linux distributions (Ubuntu, Fedora, etc.)
Python Interpreter: Python 3.6 or later is required to support features like f-strings and
improved error handling.
Editor/IDE: Any text editor (Notepad, VS Code, PyCharm, etc.) to edit and run the code.
Dependencies: No external libraries are required; the script only uses Python’s built-in
random and input/output functions.
2|Page
3. DESIGN
1) Game structure
3|Page
2) Key features of design
o Dynamic Categories: Players can select from multiple categories, adding variety to the
gameplay.
o Input Validation: The program ensures that guesses are single alphabetic characters, avoiding
errors from invalid inputs. It also prevents players from guessing the same letter multiple
times.
o Hints and Feedback: The gameplay provides hint is provided about the word’s length. After
each guess, the player receives immediate feedback on whether their guess was correct.
o Encapsulation: The main gameplay is encapsulated in the play_wordle() function, making
the code modular and easy to extend.
o Replay-ability: The game includes a replay loop, allowing players to play multiple rounds
without restarting the program.
o User-Friendly: The instructions are clear, and the interactive prompts guide players
throughout the game.
o Randomized Gameplay: By randomly selecting words, the game ensures variety and
replayability.
o Minimal Dependencies: The program uses only built-in Python libraries, making it
lightweight and easy to run.
4|Page
4) Technical design highlights
5|Page
4. SOURCE CODE
6|Page
7|Page
Explanation
Imports random: allow the program to randomly select a word from the word lists.
play_wordle ( ): Defines the main function of the game called play_wordle().
game introduction: Prints the title of the game. Prompts the player to enter their name. Greets
the player by name and wishes them luck. Multiple print () statements provide a step-by-step
guide on how the game works.
Category setup:
Define word categories (lists): Separate lists are created with variables named car, anime,
marvel, country which contain a set of car brands, anime names, marvel characters,
country names respectively
Category selection menu: Multiple print () statements display the category options (e.g.,
car brands, anime names, etc.).
x = int (input ('enter the number: ')): Prompts the player to choose a category by
entering a number (1–4).
8|Page
Condition to match category:
o (if x == 1:): Selects car category if the player chooses 1. Sets the variable words to the
car list and prompts the player to guess a car brand.
o Similar conditions for other categories (anime, marvel, and country).
o (Else:): If an invalid number is entered, loops until the player enters a valid choice (1–
4).
o (while turn > 0:): Keeps the game running as long as the
player has remaining chances.
o (failed = 0): Tracks the number of letters not yet
guessed.
o (for char in word :): Iterates through each letter in the
word.
o (if char in guesses:): If the letter has been guessed, it is
displayed.
o (elif char == '_':): Displays a space if the character is an underscore (_).
o (else:): displays an underscore (_) for a letter that is not yet guessed and increment the
failed counter.
Check for win condition:
o If there are no more unguessed letters, the
player wins.
o Displays a congratulatory message and exits
the loop with break.
9|Page
Player guess:
10 | P a g e
5. RESULTS
welcome message:
Category selection:
Gameplay:
11 | P a g e
Feedback on input:
If the guess is valid but already
guessed:
It displays (You've already guessed
that letter, try a new one.)
Losing a game:
If the player runs out of turns, the game displays a "YOU
LOST" message and reveals the correct word.
12 | P a g e
6. REFERENCES
https://thecleverprogrammer.com/2021/01/15/hangman-game-with-python/
https://www.geeksforgeeks.org/python-program-for-word-guessing-game/
https://www.javatpoint.com/python-program-for-word-guessing-game
13 | P a g e