Hangman2 0
Hangman2 0
rie, mysore
hanGman
name: shreyas srinath
class: 11 a
th
roll number: 19
subject: computer science
1
certificate
siGnature siGnature
(teacher) (principal)
2
acknowleDGement
I want to convey my heartfelt gratitude to my teacher, Mrs.
Preethi mam, for their support and encouragement during the
research of this computer science project. Their expertise in
the subject matter greatly contributed to the depth and quality
of the project.
shreyas. s
11 ath
3
inDeX
sl
content
no
1 introDuction to the Game
3 proposeD system
7 source coDe
8 output
9 requirements
10 conclusion
11 biblioGraphy
4
introDuction to the Game
5
In python:
This is a simple Hangman game using Python programming
language. Beginners can use this as a small project to boost
their programming skills and understanding logic.
The Hangman program randomly selects a secret word from a
list of secret words. The random module will provide this
ability, so line 1 in program imports it.The Game: Here, a
random word is picked up from our collection and the player
gets limited chances to win the game.When a letter in that
word is guessed correctly, that letter position in the word is
made visible. In this way, all letters of the word are to be
guessed before all the chances are over.
First, we will ask for the name of the user. We will take the user
input using the input () method. After execution, the input ()
method takes the input from the user and returns a string. Next,
we will select a word and ask the user to start guessing the
characters in the word.
Inside the while loop, if the user guesses the correct character.
We will include it in the response. Otherwise, we will notify the
user that they made a mistake.
If the user is able to guess all the characters of the word within
the maximum number of attempts, they win the game.
If the user exhausts all their attempts before guessing the entire
word, they lose.
6
objectives of the project
1. To develop an understanding of how computing
technology presents new ways to address problems, and
use computational thinking to analyse problems and to
develop and evaluate solutions.
2. To develop an understanding of the working of computers,
the 1st component parts of computer systems and how
they interrelate, software , data, communications and
users of computing technology.
3. Appreciate the ethical and social implications relating to
the use of technology and information and identify the
impact of technology on human life.
4. To develop a program that helps in calculating the BMI in
an easier way compared to other ways.
5. To create a program that has no errors or malfunctions
during the time of execution.
7
proposeD system
The origins of Hangman are obscure meaning not discovered,
but it seems to have arisen in Victorian times, ” says Tony
Augadre, author of The Oxford Guide to Word Games. The
game is mentioned in Alice Bertha Gomme’s “Traditional
Games” in 1894 under the name “Birds, Beasts and Fishes.”
The rules are simple; a player writes down the first and last
letters of a word and another player guesses the letters in
between. In other sources, [where?] the game is called
“Gallows”, “The Game of Hanging”, or “Hanger”.
8
system Development life
cycle
9
Stages (Phases) of System Development Life Cycle
Stage 1: Plan
The Planning stage lays the groundwork for the entire SDLC. It
involves identifying the system’s goals, defining project scope,
setting objectives, establishing timelines, and determining
available resources. Planning ensures that the development
process aligns with organizational needs and sets a clear
direction for subsequent stages.
Stage 2: Analyse
Stage 4: Develop
Stage 5: Implement
Stage 6: Maintain
11
How is System Development Life Cycle different from System
Design Life Cycle?
• Scope:
• Phases:
• Emphasis:
12
design, including user requirements, system
functionality, coding, and ongoing maintenance.
• Objective:
• Involvement:
• Output:
• Timeframe:
15
source coDe
import random
words=['rainbow','computer','science','programming','python','m
athematics','player','condition','reverse','water','board','geeks','bl
ackberry','empathy','organization','wolves','bacteria','abandon']
print (" the word you should guess will be in this group", words)
word= random.choice(words)
guesses=' '
turns=20
while turns>0:
failed=0
if char in guesses:
else:
print ("_")
failed+=1
if failed==0:
16
print ("The word is:", word)
break
guesses+=guess
turns-=1
print("wrong")
if turns==0:
17
output
enter guess: r
r_
18
enter guess: i
r_
I_
enter guess: b
r_
I_
b_
enter guess: w
r_
I_
b_
enter guess: a
rai_
19
b_
enter guess: o
rai_
bow
enter guess: n
20
screenshot of proGram with output
21
22
flow chart
23
requirements
Hardware requirements:
Processor: AMD ryzen 5 5000 series 5500u
Rom:
Ram:
Laptop: Lenovo ideapad slim 1
Software requirements:
Windows 11
Python thonny interpreter
24
conclusion
To conclude I would like to say that python can be used
everywhere and it should be used with proper knowledge. also
this project has increased my knowledge on how python
works.
25
biblioGraphy
1. computer science with python- class 11 NCERT
textbook.
2. Website: https://www.geeksforgeeks.org/.
26