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

python mpkk

The document is a micro project report on a 'Word Guessing Game' developed by students of the Diploma in Computer Engineering at CSMSS College of Polytechnic. It outlines the project's aims, methodology, course outcomes, and the educational benefits of learning programming through game development. The report also includes acknowledgments, a project timeline, and a literature review on the implementation and cognitive benefits of word guessing games.

Uploaded by

sanchitahiwrale
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

python mpkk

The document is a micro project report on a 'Word Guessing Game' developed by students of the Diploma in Computer Engineering at CSMSS College of Polytechnic. It outlines the project's aims, methodology, course outcomes, and the educational benefits of learning programming through game development. The report also includes acknowledgments, a project timeline, and a literature review on the implementation and cognitive benefits of word guessing games.

Uploaded by

sanchitahiwrale
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

A

MICRO PROJECT REPORT ON

“WORD GUESSING GAME”


FOR THE DIPLOMA IN COMPUTER ENGINEERING
SUBMITTED BY
MANASWI DINESH BORSE
KSHITIJA MUKTESHWAR SHELKE
PRATIKSHA DASHRATH VANJARE
UNDER THE GUIDANCE OF
MS. N. S. WAGH
DEPARTMENT OF COMPUTER ENGINEERING
CSMSS OF COLLEGE POLTYECHNIC,
CHHATRAPATI SAMBHAJI NAGAR, MAHARASHTRA,
INDIA

AND
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION, MUMBAI

ACADEMIC YEAR 2023-24


CERTIFICATE
This is to certify that Following Students of sixth semester of Diploma in
Computer Engineering of Institute CSMSS College of Polytechnic (code:1152) have
completed the Micro Project satisfactorily in subject Programming With
Python(22616) for the academic year 2023-24 as prescribed in the curriculum.

Place: Chh. Sambhajinagar.

Date:

Sr.no Name of the students Enrollment no.

1 MANASWI DINESH BORSE 2111520045

2 KSHITIJA MUKTESHWAR SHELKE 2111520109

3 PRATIKSHA DASHRATH VANJARE 2111520128

PROJECT GUIDE HEAD OF DEPARTMENT

PRINCIPAL
ACKNOWLEDGEMENT

We would like to express our thanks to the people who have helped us most throughout
our project. We would like to express our sincere thanks to the principal of CSMSS
College of Polytechnic Dr. G. B. Dongre for being always with us as a motivator. We
are thankful to the H.O.D of Computer Engineering Department Ms. R. S. Pophale
for her kind support. We are grateful to our Project Guide Ms. N. S . Wagh for nonstop
support and continuous motivation for the project Her help made uspossible to complete
our project with all accurate information. A special thanks of our goes to our friends
who helped us in completing the project, where they all exchanged their own interesting
ideas. We wish to thanks our parents for their personal support or attention who inspired
us to go our own way. Finally, we would like to thank God who made all things possible
for us till the end.

Sr. Name of Students Sign


No.
1 MANASWI DINESH BORSE

2 KSHITIJA MUKTESHWAR SHELKE

3 PRATIKSHA DASHRATH VANJARE


••••••••••••••••••••••••••••••••• INDEX ••••••••••••••••••••••••••••••••••••

1. MICRO - PROJECT PROPOSAL.................................................................. 1 - 2

2. RATIONALE ....................................................................................................... 3

3. AIMS / BENEFITS OF THE MICRO- PROJECT ............................................. 4

4. COURSE OUTCOMES ACHIEVED .................................................................5

5. LITERATURE RIEVEW .............................................................................. 6-10

6. PROGRAM CODE……………………………………………………………10-13

7. OUTPUT…………………………………………………………………………14-15

8. CONCLUSION………………………………………………………………….16

9. SKILL DEVELOPED / LEARNINGOUTCOMES OF MICRO-PROJECT…17

10. APPLICATION OF MICRO-PROJECT………………………………………17

11. REFERENCE…………………………………………………………………18
1. MICRO – PROJECT PROPOSAL

TITLE: WORD GUESSING GAME

1.0 AIMS /BENEFITS OF THE MICRO PROJECT –


The aim of a word guessing game, often called a "word guessing challenge" or "word guessing
game," is to have participants try to guess a word based on clues provided by another player or a
set of predefined rules. These games are typically played for entertainment and can vary widely in
format and complexity.
2.0 COURSE OUTCOMES ADDRESSED –
1.Develop program using control statement.
2.Perform operations based on arrays and graphics.
3. Develop programs by applying various object oriented concepts.
4. Use form controls with validation to collect user's input.
3.0 PROPOSED METHODOLOGY:
1. Basic information about word guessing game using python
2. Measure the performance guessing game using python

4.0 ACTION PLANS:

Sr. Details of Activities Planned Planned Name of Responsible


No. Start Date End Team Members
Date

1 Decide subject for micro project. 06/02/2024 09/02/2024 All

2 Preparation and submission of All


Abstract. 10/02/2024 15/02/2024

3 Collection of data. 20/02/2024 28/02/2024 All

4 Discussion and outline of All


Content. 01/03/2024 08/03/2024

5 Formulation of content. 10/03/2024 15/03/2024 All

6 Editing of Content. 27/03/2024 01/04/2024 All

7 Final submission of
08/04/2024 11/04/2024 All
Micro-Project.

1
❖ NAMES OF TEAM MEMBER WITH ROLL NO:

Sr.no. Name of Students Roll no

1 MANASWI DINESH BORSE 5

2 KSHITIJA MUKTESHWAR SHELKE 39

3 PRATIKSHA DASHRATH VANJARE 52

Approved by
Ms. N. S. WAGH

2
2. RATIONALE
Python is powerful programming language. It has efficient high-level data structures and a simple but
effective approach to object-oriented programming. Python code is simple, short readable, intuitive, and
powerful, and thus it is effective for introducing computing and problem solving to beginners. It's elegant
syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting
and rapid application development in many areas on most platforms.

3
3. AIMS / BENEFITS OF THE MICROPROJECT

❖ Micro - Project aims


The game will provide feedback with each guess, revealing which letters are correctly guessed and their
positions within the word. Building this word guessing game will introduce us to fundamental
programming concepts such as input handling, conditionals, and loops.

❖ Benefits of project:

➢ Programming Skills Development: Developing a word guessing game in Python can help improve
your programming skills, especially if you're a beginner. You'll get hands-on experience with
concepts such as loops, conditionals, functions, string manipulation, and data structures like lists and
dictionaries.

➢ Problem-Solving Skills: Designing the game involves breaking down the problem into smaller,
manageable parts and figuring out how to implement each part effectively. This helps enhance your
problem-solving skills, a crucial ability in programming

4
4. COURES OUTCOME ACHIVED

1. Programming Fundamentals: Students will reinforce their understanding of programming


fundamentals such as variables, loops, conditionals, functions, and data structures like strings and
lists.
2. Problem-solving Skills: By breaking down the problem of creating a word guessing game into
smaller tasks and implementing solutions for each, students enhance their problem-solving skills,
a key competency in programming.
3. Algorithm Design and Analysis: Students will develop algorithms for generating random words,
checking user input, and determining if the guess is correct. This exercise helps them practice
algorithm design and analysis.
4. User Input Handling: Students gain experience in handling user input, validating it, and providing
appropriate responses, which is essential for building interactive applications.
5. Debugging and Testing: Throughout the development process, students encounter bugs and errors
that need to be identified and fixed. This helps them improve their debugging and testing skills.

5
5. LITERATURE REVIEW
• Word Guessing Game using python

Python is an extremely versatile programming language employed by many large companies. It is a


simple and easy-to-understand syntax, which makes it perfect for those trying to master computer
programming for the first time. It is a high-level programming language. Its fundamental design principle
is about understanding code and the syntax that lets programmers communicate concepts within a few
lines of code.

In this tutorial, we'll use the "random module" to play an interactive game of word guessing. This game
is intended for those who are just beginning to learn to code in Python and will give them an overview
of strings, loops, and conditional (If, otherwise) statements.

• Random Module:

Sometimes, we need the computer to choose the random number from the specified range, choose an
element randomly from a set, choose the random card from an assortment of decks, flip a coin, and so
on. The random module allows the ability to access functions that can support these kinds of operations.
One of these operations is the random.choice() technique (returns an unspecified item from a tuple, list,
or string.) which we'll make use of to choose the random words from a set of terms we've generated. The
game involves an array of words from which our interpreter will select one random word. The player
must first input their names and is challenged to guess the alphabet of their choice after that. If the random
word is comprised of the alphabet, it will be displayed in the output (with proper placement); otherwise,
the program will prompt you to choose an alternative alphabet. Users will be given 12 turns (can be
modified according to) to determine the full word. Below is an example of the Python implementation

A word guessing game typically involves a player attempting to guess a hidden word, letter by letter,
within a certain number of attempts. The game usually proceeds as follows:

Initialization: The game starts by selecting a word from a predefined list or generating a random word.
This word is kept hidden from the player.

Displaying Information: The player is informed about the length of the word (e.g., "_ _ _ _ _ _") and
the number of attempts they have.

6
Guessing: The player guesses letters one by one, attempting to uncover the hidden word. After each
guess, the game provides feedback on whether the guessed letter is present in the word and its position(s).

Feedback: Depending on the correctness of the guess, the game informs the player if the guessed letter
is correct or incorrect and updates the display accordingly.

Win/Lose Conditions: The game continues until the player either guesses the entire word correctly or
runs out of attempts. If the player guesses the word within the allowed attempts, they win; otherwise,
they lose.

Option to Play Again: After the game ends, the player may be given the option to play again, restarting
the process with a new word.

Players can enjoy this game individually or in multiplayer mode, where they take turns guessing the word
within a set time limit Developing this game involves implementing various programming concepts,
including string manipulation, conditional statements, loops, and user input handling. It offers an
opportunity to practice problem-solving skills, algorithm design, and software development best practices
The game can be customized in numerous ways, such as adjusting the difficulty level by changing the
word length or the number of allowed attempts, adding hints or clues, incorporating a scoring system, or
introducing thematic variations (e.g., categories of words). Overall, it's a versatile and enjoyable project
for both learners and developer

A word guessing game, also known as "Hangman," is a classic word game where one player thinks of a
word and the other player tries to guess it by suggesting letters within a certain number of attempts. Let's
break down the components and mechanics of a word guessing game in detail:

Components: Word Selection: The game begins with one player (the "chooser") selecting a word. This
word is typically kept hidden from the other player (the "guesser").

Display: Initially, the guesser sees a representation of the word with blanks for each letter, indicating its
length. For example, if the chosen word is "PYTHON," the display might initially show "_ _ _ _ _ _".

Attempts Counter: The guesser is given a limited number of attempts to guess the word. This counter
decreases with each incorrect guess.

7
Alphabet Display: The guesser typically sees a display of the alphabet or a set of buttons representing
each letter that they can choose from to make their guess.

Feedback: After each guess, the guesser receives feedback on whether the guessed letter is present in the
word and its position(s) if it is.

Win/Lose Conditions: The game ends when the guesser either correctly guesses the word or exhausts
all their attempts without guessing correctly.

Mechanics: Guessing Process:

The guesser selects a letter they think might be in the word.

The game checks if the guessed letter is in the word.

If the guessed letter is correct, the game updates the display to reveal the letter's position(s) in the word.

If the guessed letter is incorrect, the game decreases the remaining attempts counter.

Feedback: If the guessed letter is correct, the game provides feedback indicating its position(s) in the
word (e.g., "The letter 'A' is in the word at positions 2 and 4").

If the guessed letter is incorrect, the game informs the guesser and may display a visual representation of
a hangman being drawn (representing the number of incorrect guesses).

Win/Lose Conditions: If the guesser correctly guesses all the letters in the word before running out of
attempts, they win the game. If the guesser exhausts all their attempts without correctly guessing the
word, they lose the game.

Game Loop: The game continues until the guesser wins or loses. After the game ends, the chooser may
reveal the word to the guesser, and they may choose to play again with a new word.

Additional Features:

Difficulty Levels: The game may offer multiple difficulty levels, such as easy (fewer letters, more
attempts) or hard (longer words, fewer attempts).

Visual Elements: Adding visual elements like a hangman figure being drawn progressively with each
incorrect guess can enhance the game's appeal.
8
Word Categories: The chooser may select words from specific categories (e.g., animals, countries,
movies) to add variety to the game.

Scorekeeping: Implementing a scoring system based on the number of attempts taken or the difficulty
level can add a competitive element to the game.

Hint System: Incorporating a hint system where the guesser can ask for a clue about the word (e.g., its
category or a letter in the word) can make the game more accessible.

Multiplayer Mode: Allowing multiple players to take turns as the chooser and guesser adds a social
element to the game.

Implementation:

Developing a word guessing game involves programming concepts such as string manipulation,
conditional statements, loops, user input handling, and possibly graphical user interface (GUI)
development if you want to create a more interactive experience. You can implement the game in various
programming languages, but Python is commonly used due to its simplicity and versatility.

• Educational Benefits:

1) Language Learning: Word guessing games can help players expand their vocabulary as they
encounter new words during gameplay. They learn to recognize and spell words correctly.
2) Spelling Practice: By guessing letters to form words, players practice spelling and reinforce their
understanding of word structures.
3) Reading Comprehension: Players improve their reading comprehension skills by deciphering
clues or hints provided during the game.
4) Critical Thinking: Players must think critically to deduce possible words based on the clues
provided, such as word length or theme.
5) Strategy Development: As players make educated guesses based on patterns and available letters,
they develop strategic thinking skills.

9
• Cognitive Benefits:

1) Memory Enhancement: Remembering previously guessed letters and their positions helps
improve memory retention.
2) Problem-Solving Skills: Players engage in problem-solving as they strategize to deduce the
hidden word within the given constraints.
3) Pattern Recognition: Recognizing patterns in the guessed letters and word structures aids in
deciphering the hidden word efficiently.
4) Attention to Detail: Players pay close attention to the feedback provided after each guess,
fostering attention to detail.
5) Persistence and Resilience: Trying multiple guesses despite initial failures encourages persistence
and resilience in players.

• Social and Emotional Benefits:

1) Collaboration and Cooperation: Word guessing games can be played collaboratively, fostering
teamwork and cooperation among players.
2) Friendly Competition: Competitive elements, such as scorekeeping or time limits, add excitement
and friendly competition to the gameplay.
3) Sense of Accomplishment: Successfully guessing the word or making progress in the game boosts
players' self-esteem and sense of accomplishment.
4) Stress Reduction: Engaging in a fun and mentally stimulating activity like a word guessing game
can help reduce stress and promote relaxation.
5) Social Interaction: Playing word guessing games with others encourages social interaction,
whether in person or online, promoting communication skills and social connections.

10
7.Program code
import random
import tkinter as tk

def choose_word():
words_and_hints = {
"apple": "A common fruit",
"banana": "Yellow and long fruit",
"orange": "A citrus fruit",
"grape": "A small round fruit often found in bunches",
"kiwi": "A small, brown, and fuzzy fruit",
"pineapple": "A tropical fruit with a spiky exterior",
"strawberry": "A small, red fruit with seeds on the outside",
"blueberry": "A small, round, and blue fruit often used in muffins",
"watermelon": "A large fruit with green skin and red flesh"
}
word, hint = random.choice(list(words_and_hints.items()))
return word, hint

def display_word(word, guessed_letters):


display = ""
for letter in word:
if letter in guessed_letters:
display += letter
else:
display += "_"
return display

def update_display():
display_text.set(display_word(word, guessed_letters))
hint_label.config(text="Hint: " + hint)

def check_guess():
global attempts
11
guess = guess_entry.get().lower()
if guess in guessed_letters:
feedback_label.config(text="You already guessed that letter.")
elif guess in word:
guessed_letters.append(guess)
feedback_label.config(text="Correct!")
else:
global attempts
attempts -= 1
attempts_label.config(text="Attempts left: {}".format(attempts))
feedback_label.config(text="Incorrect.")

update_display()

if "_" not in display_word(word, guessed_letters):


feedback_label.config(text="Congratulations! You guessed the word: " + word)

def main():
global word, hint, guessed_letters, attempts
word, hint = choose_word()
guessed_letters = []
attempts = 6

# Create main window


window = tk.Tk()
window.title("Word Guessing Game")

# Display word and hint


global display_text, hint_label, guess_entry, feedback_label, attempts_label
display_text = tk.StringVar()
display_text.set(display_word(word, guessed_letters))
word_label = tk.Label(window, textvariable=display_text)
word_label.pack()

12
hint_label = tk.Label(window, text="Hint: " + hint)
hint_label.pack()

# Input field for guessing


guess_entry = tk.Entry(window)
guess_entry.pack()

# Button to submit guess


guess_button = tk.Button(window, text="Submit Guess", command=check_guess)
guess_button.pack()

# Feedback label
feedback_label = tk.Label(window, text="")
feedback_label.pack()

attempts_label = tk.Label(window, text="Attempts left: {}".format(attempts))


attempts_label.pack()

# Start the main loop


window.mainloop()

if _name_ == "_main_":
main()

13
8.OUTPUT

Fig:8.1

Fig:8.1

14
Fig:8.3

Fig:8.4

15
9.CONCLUSION

In conclusion, the word guessing game is not just a source of entertainment but also a valuable tool for
enhancing vocabulary, critical thinking, and communication skills. Through the process of guessing
words based on contextual clues or limited information, players develop their cognitive abilities and
linguistic prowess. Moreover, the game fosters teamwork, cooperation, and creativity as participants
work together to unravel the mystery behind each word. Whether played casually among friends or as a
structured educational activity, the word guessing game remains a timeless favorite, offering endless
opportunities for fun and learning.

16
10.SKILL DEVELOPED / LEARNING OUTCOMES OF MICRO PROJECT

1) Communication

2) Leadership

3) Team management

4) Negotiation

5) Personal organization

6) Risk management

7) Critical thinking

8) Task management

9) Working with team

17
APPLICATIONS OF MICRO – PROJECT

1) Education: Teachers can use the game to make learning vocabulary more engaging and
interactive for students. It can be incorporated into language arts lessons to reinforce
word meanings, spelling, and comprehension skills.
2) Language Learning: The game can be utilized in language learning programs to help
learners improve their language proficiency by practicing vocabulary and understanding
context.
3) Team Building: Companies and organizations can use the game as a team-building
activity to improve communication, collaboration, and problem-solving skills among
employees.
4) Therapy and Rehabilitation: The game can be adapted for use in speech therapy and
rehabilitation programs to help individuals improve their language and cognitive abilities
in a fun and stimulating way.
5) Entertainment: The project can be developed into a mobile app or online game for
entertainment purposes, allowing people to play and enjoy the game solo or with friends
and family.
11.REFERERNCE

1. https://en.wikipedia.org/wiki/Word_game
2. https://boardgamegeek.com/boardgamefamily
/62861/word-games-guess-word
3. https://www.geeksforgeeks.org/python-
program-for-word-guessing-game/

18

You might also like