Computer Science Investigatory Project

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

SHREE SWAMINARAYAN

PUBLIC SCHOOL
GANDHINAGAR

COMPUTER SCIENCE INVESTIGATORY


PROJECT
ON
RANDOM NUMBER GUESS USING PYTHON

2021-22 (CLASS-XI)

SUBMITTED BY: RISHIT JOSHI


BOARD’S ROLL NO: 08
CERTIFICATE
This is to certify that Rishit Joshi of class XI science has
prepared the investigatory project of Computer Science entitle
Random Number Guess Using Pythom during academic year
2021-22. He has prepared the project under my guidance.

____________ ____________ ____________


Ext. Examiner PGT Computer Principal’s Sign
Science
ACKNOWLEDGEMENT
I Rishit Joshi would like to express my sincere gratitude to my
computer science teacher Ms. Ishani Shukla for her vital
support, guidance and encouragement without which this project
would not have come forth from my side. Special thanks goes to
my teacher who helped me a lot in completing the project by
giving interesting ideas, thoughts and made this project accurate.
I wish to thank my parents for their undivided support and
interest who inspired and encouraged me to go on our way,
without which I would be unable to complete my project.
And at last but by no mean the least I would like to thank the
almighty God who made all the things possible.
Index

 INTRODUCTION

 HARDWARE AND SOFTWARE REQUIRED

 FLOW CHART

 SOURCE CODE

 OUTPUT

 BIBLIOGRAPHY
Introduction

 In this game the computer chooses a random


number between 1 and 100, and the player tries
to guess the number in as few attempts as
possible.
 Each time the player enters a guess, the
computer tells him whether the guess is too
high, too low, or right.
 Once the player guesses the number, the game
is over.
HARDWARE AND SOFTWARE
REQUIREMENTS
HARDWARE REQUIRED:

I. OPERATING SYSTEM : WINDOWS 7 AND ABOVE

II. PROCESSOR : PENTIUM(ANY) OR AMD

ATHALON(3800+- 4200+ DUAL CORE)

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

K9MM-V VIA K8M800+8237R

PLUSCHIPSET FOR AMD

ATHALON

IV. RAM : 512MB+

V. Hard disk : SATA 40 GB OR ABOVE

VI. CD/DVD r/w multi drive combo: (If back up required)

VII. FLOPPY DRIVE 1.44 MB : (If Backup required)

VIII. MONITOR 14.1 or 15 -17 inch

IX. Key board and mouse

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

SOFTWARE REQUIREMENTS:

I. Windows OS
II. Python
FLOW CHART
SOURCE CODE

SOLUTION

import random
number=random.randrange(0,10)
guessCheck="wrong"
print("Welcome to Number Guess")

while guessCheck=="wrong":
response=int(input("Please input a number between 0 and100:"))
try:
val=int(response)
except ValueError:
print("This is not a valid integer. Please try again")
continue
val=int (response)
if val<number:
print("This is lower than actual number. Please try again.")
elif val>number:
print("This is higher than actual number. Please try again.")
else:
print("This is the correct number")
guessCheck="correct"

print("Thank you for playing Number Guess. See you again")


OUTPUT
BIBLIOGRAPHY

1. Computer science With Python - Class XI By : Sumita


Arora
2. A Project Report On Blood Bank Management
System (BBMS) By : Praveen M Jigajinni
3. Website: https://www.w3resource.com
4. https://en.wikipedia.org/wiki/E_(mathematical_constant)

You might also like