0% found this document useful (0 votes)
13 views13 pages

Cs Project Guesstheword

The document is a project report for a word-guessing game titled 'Guess the Word' created by Thaniska Thulasiram at Vedanta Academy for the academic year 2024-25. It includes an introduction to Python programming, the game's concept, source code, and hardware and software requirements. The project emphasizes the importance of guidance and support received during its development.

Uploaded by

thanishka778
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)
13 views13 pages

Cs Project Guesstheword

The document is a project report for a word-guessing game titled 'Guess the Word' created by Thaniska Thulasiram at Vedanta Academy for the academic year 2024-25. It includes an introduction to Python programming, the game's concept, source code, and hardware and software requirements. The project emphasizes the importance of guidance and support received during its development.

Uploaded by

thanishka778
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/ 13

VEDANTA ACADEMY

Vanagaram Chennai - 600077

Computer Science (083)


Project Report
Session: 2024-25

Name : THANISHKA THULASIRAM

Grade : 11A

Reg. No : 11A42

Project Title : GUESS THE WORD


BONAFIDE CERTIFICATE

Certified to be the Bonafide project work done by

___________________ of class XI of Vedanta Academy,

Vanagaram, Chennai -600077 during the academic year 2024-25.

Date: Teacher-in-Charge

INTERNAL EXAMINER EXTERNAL EXAMINER


ACKNOWLEDGEMENT

Apart from the effort of mine, the success of this project depends largely on the
encouragement and guidance of many others. I take this opportunity to express my
gratitude to the people who have been instrumental in successful completion of this
project.

I express deep sense of gratitude to almighty God for giving me strength for the
successful completion of this project.

I express my heartfelt gratitude to my parents for constant support and


encouragement while carrying out this project.

I express deep sense of gratitude to the luminary The Principal Mrs. Maya, who
has been continuously motivating and extending their helping hand to us.

My sincere thanks to Mr. Sanjay R, the teacher in-charge, a guide, a mentor, and
above all, a friend who critically reviewed my project and helped in solving each
and every problem occurred during the implementation of the project.

The guidance and support received from all the members who contributed and who
are contributing to this project was vital for the success of this project. I am grateful
for their constant support and help.
TABLE OF CONTENTS

PAGE
SNO DESCRIPTION
NO

1
01 INTRODUCTION TO PYTHON

2
02 INTRODUCTION TO THE PROJECT

3
03 SOURCE CODE

08
04 OUTPUT

11
05 HARDWARE AND SOFTWARE REQUIREMENTS

12
06 BIBLIOGRAPHY
INTRODUCTION TO PYTHON

Python is a widely used general-purpose, high level programming language. It was initially
designed by Guido van Rossum in 1991 and developed by Python Software Foundation. It was
mainly developed for emphasis on code readability, and its syntax allows programmers to express
concepts in fewer lines of code. Python is a programming language that lets you work quickly and
integrate systems more efficiently.

It is used for,

• Web Development (Server-side)

• Software Development

• System Scripting

Features of Python:

➢ Python is an intepreted, interactive, directly executed language with a pre-compiled code.

➢ Python is object-oriented programming language

➢ It’s easy to use and learn

➢ Its free, open-source and portable language

➢ It consists of large repository of libraries.

➢ It is easily compatible with other language like C, C++, Core Java , etc.,

➢ It is both scientific and non-scientific programming.


INTRODUCTION TO THE PROJECT

Guess the Word is an engaging word-guessing game where players try to uncover a hidden
word by guessing one letter at a time. The word is initially displayed as underscores, with each
correct letter revealed in its corresponding position. Players have 7 attempts to guess the correct
letters. If an incorrect letter is guessed, an attempt is lost. The goal is to guess the entire word
before running out of attempts.
With a selection of randomly chosen words from a variety of categories, this game is both fun and
challenging. The game ends when the player either guesses the word correctly or exhausts all
attempts.

Features:
• Randomly selected words from a predefined list
• 7 attempts to guess the word
• Keeps track of guessed letters and attempts
• Simple and interactive gameplay
Source code:
import random

# List of possible words

words = ["python", "happy", "radio", "laptop", "plane", "mouse", "shape"]

noofwords = len(words)

wordindex = random.randint(0,noofwords)

# Randomly select a word

word = words[wordindex]

# Initialize game state

word_state = []

# Fill the list with underscores for each letter in the word

for letter in word:

word_state.append("_")

guessed_letters = [] # List of guessed letters

attempts = 7 # Total attempts allowed

# Game introduction

print("Welcome to 'Guess the Word'!\n")

print("Guess the word by entering one letter at a time.")

print("The word has ",len(word) ,"letters:", ' '.join(word_state))

print("You have 7 attempts. Good luck!\n")

# Game loop

while attempts > 0 and "_" in word_state:

# Show the current state of the word

print("Word: ", " ".join(word_state))

print("Guessed letters: ",', '.join(guessed_letters) if guessed_letters else 'None')


print("Attempts remaining: ",attempts, "\n")

# Get player's guess

guess = input("Enter a letter: ").lower()

# Validate input

if len(guess) != 1 or not guess.isalpha():

print("Invalid input. Please enter a single letter.\n")

continue

if guess in guessed_letters:

print("You already guessed that letter. Try again.\n")

continue

# Add guess to guessed letters

guessed_letters.append(guess)

# Check if the guess is in the word

if guess in word:

print("Good job! ", guess," is in the word!\n")

# Update word state

for i in range(len(word)):

if word[i] == guess:

word_state[i] = guess

else:

print("Sorry,", guess, " is not in the word.\n")

attempts = attempts - 1

# End of game

if "_" not in word_state:

print("\nCongratulations! You guessed the word:", "".join(word_state))


else:
print("\nGame Over. You ran out of attempts.")

print("The word was:", word)

Output:
When the word is guessed correctly
Output when the word is not guessed within seven attempts:
HARDWARE AND SOFTWARE REQUIREMENTS

HARDWARE REQUIREMENTS:

OPERATING SYSTEM : WINDOWS 7 AND ABOVE

PROCESSOR : PENTIUM(ANY) OR AMD


ATHALON(3800+- 4200+ DUAL CORE)

MOTHERBOARD : 1.845 OR 915,995 FOR PENTIUM 0R MSI


K9MM-V VIA K8M800+8237R PLUS
CHIPSET FOR AMD ATHALON

RAM : 512MB+

Hard disk : SATA 500 GB OR ABOVE

MONITOR : 14.1 or 15 -17 inch

Keyboard and mouse

Printer : (if print is required – [Hard copy])

SOFTWARE REQUIREMENTS:

◦ Windows OS

◦ Python 3.7 or above version

You might also like