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

Number Guessing Game Project Report

The document is a project report on a 'Number Guessing Game' created using Python by students Ayush Ranjan and Ayush Paikaray from PM Shri Kendriya Vidyalaya Puri for the academic session 2024-2025. It includes sections such as an abstract, introduction, system requirements, source code, output examples, and a conclusion highlighting the educational value of the project. The game allows users to guess a randomly generated number, providing feedback on their guesses until the correct number is identified.

Uploaded by

ayushpaikaray666
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)
26 views13 pages

Number Guessing Game Project Report

The document is a project report on a 'Number Guessing Game' created using Python by students Ayush Ranjan and Ayush Paikaray from PM Shri Kendriya Vidyalaya Puri for the academic session 2024-2025. It includes sections such as an abstract, introduction, system requirements, source code, output examples, and a conclusion highlighting the educational value of the project. The game allows users to guess a randomly generated number, providing feedback on their guesses until the correct number is identified.

Uploaded by

ayushpaikaray666
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

PM Shri Kendriya Vidyalaya Puri

COMPUTER SCIENCE PROJECT


SESSION: 2024 - 2025

A PROJECT ON
“NUMBER GUESSING GAME”

Submitted By Submitted To
Name : Teacher
Ayush Ranjan___- 17 PGT(Computer Science)
Ayush Paikaray_- 16
Class: XI A

PM Shri Kendriya Vidyalaya Puri,


Odisha -752002
Certificate
This is to certify that (Ayush Ranjan & Ayush Paikaray)
students of class XI-A have succesfully prepared the
report on the Project entitle “Number Guessing Game.”
under the guidance of (Teacher) (PGT Computer Science).

The report acceptance as Final Project Report for the


subject Computer Science of Class XI-A (Science).

__________________________
Signature of Principal
(Principal)

__________________________
Signature of Internal Examiner
(Teacher)
PGT-Computer Science
Acknowledgement

I would like to express a deep sence of thanks and


gratitude to my project guide (Teacher) for guiding me
immensely through the project. She always evinced keen
interest in my project. Her Constructive advice and
constant motivation have been responsible for successful
completion of this project.

My sincere thanks go to (Principal) sir for this co-


ordination in extending every possible support for the
completion of this project.

I must thanks to my classmate for their timely help and


support for completion of this project.

Last but not the least, I would like to thank all those
who had helped directly and indirectly towards the
completion of this project.

Name:
Ayush Kumar Paikaray -16
Ayush Ranjan ------ -17
Class: XI A

Subject: Computer Science


Table of Contents

[Link]. Description Page

1 Certificate 2

2 Acknowledgement 3

3 Table of Contents 4

4 Abstract 5

5 Introduction 6

6 Systen Requirements of project 7

7 Sourse Code 8

8 Code In Run 9

9 Output 10

10 Conclusion 11
Abstract

Team Member:
1. Ayush Ranjan
2. Ayush Kumar Paikaray

Brief information regarding project:


Python program to create a Number Guessing Game using
Python programming concepts.

This is a project report on “Number Guessing Game using


Python” it is a python program based game which is
created for the purpose of entertainment. This python
program contain basics of python such as user input,
while condition, if- else condition.

Basic logic behind the game is that the system will ask
about a number and then according to the users input it
will gives output such as ‘Too low’ or ‘Too High’ and
when the number is guessed correct it will show output
as ‘you guesed it right!’. And this number will be
random and will depends on the random fuction which is
used in python program.

Language: Python

IDE: VS Code
Introduction
What is Python ?
Python is a high-level programming language which
makes the code very easy to read and understand. With
no need for declaration of variables, parameters and
functions, Python’s codes are usually shorter
compared to other programming languages. Python is
great language for beginners as it has a simple
syntaxand is easy to read.

What is Number Guessing Game?


A number guessing game in Python is a simple game
where the computer generates a random number, and the
player tries to guess it. The program provides
feedback to the player indicating whether their guess
is ‘too high’ or ‘too low’. This continues until the
player correctly guesses the number.

We wish you the best from the depth of our


hearts that you guess the number in First Try.
System Requirement of Project

[Link] Title:
“NUMBER GUESSING GAME”

[Link]:
“PYTHON”

[Link] and Software Requirement:


Operating system:- Window XP, 7, 8 or above
RAM:- 2GB or above
Software:- PYTHON IDLE or VS Code or any python
compiler
Processor:- 2.0 GH2 or above
Hard Drive Space:- 2GB or above
Source Code
import random

def guess(x):
random_number = [Link](1, x)
guess = 0
while guess != random_number:
guess = int(input(f'Guess a number between 1 and {x}: '))
if guess < random_number:
print('Sorry, guess again. Too low.')
elif guess > random_number:
print('Sorry, guess again. Too high.')

print(f'Yay, congrats. You have guessed the number {random_number} correctly!!')

def computer_guess(x):
low = 1
high = x
feedback = ''
while feedback != 'c':
if low != high:
guess = [Link](low, high)
else:
guess = low
feedback = input(f'Is {guess} too high (H), too low (L), or correct (C)?? ').lower()
if feedback == 'h':
high = guess - 1
elif feedback == 'l':
low = guess + 1

print(f'Yay! The computer guessed your number, {guess}, correctly!')

guess(100)
Code In Run
INPUT:

OUTPUT:
Output

Guess a number between 1 and 100: 10


Sorry, guess again. Too low.
Guess a number between 1 and 100: 25
Sorry, guess again. Too low.
Guess a number between 1 and 100: 50
Sorry, guess again. Too low.
Guess a number between 1 and 100: 85
Sorry, guess again. Too high.
Guess a number between 1 and 100: 65
Sorry, guess again. Too low.
Guess a number between 1 and 100: 70
Sorry, guess again. Too low.
Guess a number between 1 and 100: 74
Sorry, guess again. Too low.
Guess a number between 1 and 100: 75
Sorry, guess again. Too low.
Guess a number between 1 and 100: 77
Sorry, guess again. Too high.
Guess a number between 1 and 100: 76
Yay, congrats. You have guessed the number 76
correctly!!
conclusion

The Number Guessing Game project demonstrates how


fundamental concepts of Python, such as conditional
statements, loops, user input handling, and random
number generation, can be applied to create an
interactive and engaging program. This project not only
enhances programming logic but also improves problem-
solving skills by implementing user interaction and
error handling.

Through the development of this game, we gain insights


into the importance of planning, debugging, and refining
code. Such small-scale projects serve as a foundation
for more advanced programming tasks, helping learners
build confidence in writing code independently. This
game can further be improved by adding features like
difficulty levels, scoring systems, or a graphical user
interface (GUI).

Overall, this project highlights the practical


applications of Python and reinforces the value of
hands-on learning in computer science.
Reference

GeeksforGeeks:
[Link]
guessing-game-in-python/

GitHub:
[Link]
Guessing-Game

Scribd:
[Link]
umber-Guessing-Game-using-Python-project-
report-2

NCERT Computer Science Textbook


Thank You

You might also like