0% found this document useful (0 votes)
39 views14 pages

Rrock Deepikaaaaa

The document describes a hangman game project created by students. It includes an introduction to the hangman game, the objective to guess the secret word before the stick figure is hung, and certificates signed by the teacher acknowledging two students who completed the project.

Uploaded by

devyanimee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views14 pages

Rrock Deepikaaaaa

The document describes a hangman game project created by students. It includes an introduction to the hangman game, the objective to guess the secret word before the stick figure is hung, and certificates signed by the teacher acknowledging two students who completed the project.

Uploaded by

devyanimee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

ACKNOWLEDGEMENT

I’d like to thank my INFORMATIC PRACTICES Teacher Mrs.


SHIVANI SHARMA and Principal Mrs. SHVETIKA KAPOOR
(Principal Name) for their exceptional help with this assignment. I
believe that this project would not have been completed without
their direction and help.
Introduction

In this game, one player selects a word. Other players have


a certain number of guesses to guess the characters in the
word. If the players are able to guess the characters in the
entire word within certain attempts, they win. Otherwise,
they lose.

Objective
The object of the hangman is to guess the secret word before the stick
figure is hung. Players take turns selecting letters to narrow the word
down.

● Players can take turns or work together. Gameplay continues until


the players guess the word or they run out of guesses and the stick
figure is hung.
● If you want to play with younger kids, use a snowman instead of a
hangman to avoid scaring or offending anyone.
Malviya convent school,
Jaipur(raj.)

CERTIFICATE

This is to certify that candidate ROCK DEV has successfully completed the
project work entitled HANGMAN GAME in the subject Information
Practices laid down in the regulations of CBSE for the purpose of Practical

[ SHIVANI SHARMA]
PGT Comp. Science

Examiner Signature: Teacher Signature:

___________________ ________________
Malviya convent school,
Jaipur(raj.)

CERTIFICATE

This is to certify that candidate DEEPIKA DEEP has successfully completed


the project work entitled HANGMAN GAME in the subject Information
Practices laid down in the regulations of CBSE for the purpose of Practical

[ SHIVANI SHARMA]
PGT Comp. Science

Examiner Signature: Teacher Signature:

___________________ ________________
SR. DESCRIPTION PAGE
NO.
NO.

1 ACKNOWLEDGEMENT

2 INTRODUCTION

3 OBJECTIVES OF THE PROJECT

4 PROPOSED SYSTEM

5 SYSTEM DEVELOPMENT LIFE CYCLE

6 FLOW CHART

7 SOURCE CODE

8 OUTPUT

9 HARDWARE AND SOFTWARE


10 BIBLIOGRAPHY
PROPOSED SYSTEM
Following is a Python script of the classic game “Hangman”. A row of
dashes represents the word to guess. If the player guesses a letter in the
word, the script writes it in all its correct positions. The player has 10 turns
to guess the word. You can easily customize the game by changing the
variables.

● A simple interactive system that asks user for input for each letter
and game. ·
● A simple visual interface that draws the hangman as
the game progresses.
This game selects given string word from the file and asks you to guess
character for that word. You will get 8 chances to guess a word.
One player thinks of a word and the other tries to guess it by guessing
letters. Each incorrect guess brings you closer to being "hanged." This
game helps to sharpen children's spelling and word-decoding skills
SYSTEM DEVELOPMENT AND LIFE CYCLE
● 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.
● We will also define the maximum number of attempts the user
can take.
● Now, we will use a while loop to repeatedly ask the user to guess
the character until the attempts are exhausted.
● 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.
FLOW CHARTS
SOURCE CODE
#importing the time module
import time
#welcoming the user
name = input("What is your name? ")
print ("Hello, " + name, "Time to play
hangman!")
#wait for 1 second
time.sleep(1)
print ("Start guessing...")
time.sleep(0.5)
#here we set the secret. You can select any
word to play with.
word = ("secret",”principles”,”)
#creates an variable with an empty value
guesses = ' '
#determine the number of turns
turns = 10
# Create a while loop
#check if the turns are more than zero
while turns > 0:
# make a counter that starts with zero
failed = 0
# for every character in secret_word for char in
word:
# see if the character is in the players guess
if char in guesses:
# print then out the character
print (char,end=""),
else:
# if not found, print a dash
print ("_",end=""),
# and increase the failed counter with one
failed += 1
# if failed is equal to zero
# print You Won
if failed == 0:
print ("You won")
# exit the script
break
# ask the user go guess a character
guess = input("guess a character:")
# set the players guess to guesses
guesses += guess
# if the guess is not found in the secret word
if guess not in word:
# turns counter decreases with 1 (now 9)
turns -= 1
# print wrong
print ("Wrong")
# how many turns are left
print ("You have", + turns, 'more guesses' )
# if the turns are equal to zero
if turns == 0:
# print "You Lose"
print ("You Lose" )

OUTPUT:
What is your name? Deepika
Hello, Deepika Time to play hangman!
Start guessing...
______guess a character:s
s_____guess a character:e
se__e_guess a character:c
sec_e_guess a character:r
secre_guess a character:e
secre_guess a character:t
secret You won

HARDWARE AND SOFTWARE


Python provides a built-in library called pygame,
which was used to develop the game. Once we
understand the basic concepts of Python
programming, we can use the pygame library to
make games with attractive graphics, suitable
animation, and sound. Pygame is a cross-
platform library that is used to design video
games.
BIBLIOGRAPHY
● GOOGLE

● NCERT BOOKS

● ADVISOR PREETI AROR

● https://www.wikipedia.com

● https://www.w3schools.com

You might also like