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

python aat report

The document is a report on a project titled 'Wordle Game Using Python Programming' conducted by students of B.M.S College of Engineering. It outlines the game's design, hardware and software requirements, and the programming concepts utilized in its development. The game is an interactive word-guessing challenge that enhances vocabulary and problem-solving skills, featuring multiple categories and a user-friendly interface.

Uploaded by

yasirmohd1108
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)
10 views

python aat report

The document is a report on a project titled 'Wordle Game Using Python Programming' conducted by students of B.M.S College of Engineering. It outlines the game's design, hardware and software requirements, and the programming concepts utilized in its development. The game is an interactive word-guessing challenge that enhances vocabulary and problem-solving skills, featuring multiple categories and a user-friendly interface.

Uploaded by

yasirmohd1108
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/ 17

B.M.

S COLLEGE OF ENGINEERING, BENGALURU


Autonomous Institute, Affiliated to VTU

INTRODUCTION TO PYTHON PROGRAAMMING


22CS1ESPYP

ALTERNATE ASSESSMENT TOOL


Report on

WORDLE GAME
USING PYTHON PROGRAMMING

Submitted in partial fulfillment of the requirements for AAT

Bachelor of Engineering
in
Electronics and communication Engineering

Submitted by:

NAME OF THE CANDIDATE

Name roll no
MITHUN V 05
MOHAMMAD YASIR 06
MOHAMMED ALI 07
MOHAMMED HASSAN JAWAD 08

Department of Computer Science and Engineering


B.M.S College of Engineering
Bull Temple Road, Basavanagudi, Bangalore 560 019
2024-2025
B.M.S COLLEGE OF ENGINEERING
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING

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.

Student Name Student Signature

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.

Signature of the Faculty in Charge


TABLE OF CONTENTS

Sl. No. Title Page no.

1 Introduction 1

2 Hardware and Software Requirement 2

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

o Introduction and Instructions:


 The game starts with a welcome message, a prompt for the player's name, and detailed
instructions about how to play.
o Category Selection:
 The player chooses one of four categories, based on the selection, the program assigns a
predefined list of words (car, anime, marvel, country) for the game.
o Word Selection:
 A random word from the chosen category is selected using Python's random.choice()
function.
o Gameplay Loop:
 The player is given 8 turns to guess the letters in the word.
 For each turn, the program displays the word with guessed letters filled in and blanks (_)
for the remaining ones.
 If the guessed letter is correct, it is revealed in the appropriate positions. If incorrect, a turn
is deducted.
o Winning or Losing Conditions:
 If all the letters are correctly guessed before running out of chances, the player wins.
 If the player exhausts all 8 chances without guessing the word, they lose.
o Replay Option:
 After the game ends, the player is asked if they want to play again. If they say "yes," the
game restarts; otherwise, it exits.

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.

3) Strength of 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

o Randomization: random.choice() ensures words are selected randomly, enhancing


replayability.
o String Operations: String concatenation and membership checks (in) are used to manage
guesses and display the word dynamically.
o Loop-Based Design: The main gameplay logic is implemented in a while loop, which runs
until the player either wins or loses.
o Replay Mechanism: The while True construct at the end ensures the program runs until the
player opts out.

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

 Game Word Selection:

o Randomly selects a word from the chosen


category.
o Initializes an empty string to store
guessed letters.
o Initializes the number of chances the
player has (8 turns).
o Displays the length of the selected word as a hint.

 Main game loop:

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:

o (guess = input ("guess a


character:"). lower ()):
Prompts the player to guess a
letter. Converts it to lowercase
to handle case sensitivity.
o (while len(guess) != 1 or not
guess.isalpha():): Ensures the
input is a single alphabetic
character.
o (if guess in guesses:): Check if
the letter was already guessed
and warns the player if they
have already guessed the letter.
o (guesses += guess): Add guess
to the guesses string.
o (if guess not in word:): Check if the guess is incorrect and deducts a turn and
displays a "Wrong" message.
o (if turns == 0:): If no turns are left, the player loses, and the word is revealed.

 Play Again Option:

o Outer loop to replay the


game.
o (while True:): Runs the
game indefinitely until the
player chooses to quit.
o (play_again = input("Do you want to play again? (yes/no): ").lower()): Prompts
the player to play again.
o (if play_again != "yes":): Exits the loop and ends the game if the player doesn't
choose "yes".

10 | P a g e
5. RESULTS

 welcome message:

o The game greets


the player and
introduces itself
and provide
necessary
instruction.

 Category selection:

o The program displays the four categories: car brands,


manga names, Marvel characters, and country names.
o The player selects a category by entering a number (1–4).
If the input is invalid, the program asks for input again.

 Gameplay:

 The game displays the word with underscores (_)


for each letter not yet guessed.
 Correct guesses fill in the blanks, while incorrect
guesses deduct one turn.
 Already guessed letters are displayed
in their correct positions.

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

 If the input is invalid:


It displays (Please enter a valid single character:)

 Winning the game


 If all letters in the word are guessed, the program
congratulates the player and shows the full word.

 Losing a game:
 If the player runs out of turns, the game displays a "YOU
LOST" message and reveals the correct word.

 Playing again prompt:


 After winning or losing, the game asks if the player wants to play again. If "yes" is
entered, the game restarts. If "no," the game ends with a goodbye message.

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

You might also like