Kali Charan Nigam Institute of Technology Banda (U.P)
SESSION 2022-23
DEPARTMENT OF COMPUTER SCINCE AND ENGINEERING
A MINI PROJECT REPORT (KCS-752)
ON
“Guess The Number Game”
Submitted in partial Fulfillments to the requirement for the degree
Of
Bachelor of Technology
In
Computer Science & Engineering
Under the guidance
Of
Mr. Pradeep Sachan
Submitted To: Submitted By:
Mr. Ashish Srivastava Kaushal dwivedi
Assistant professor of CS department Roll No: 2101390100036
S.NO TITLE PAGE.NO.
1. Introduction of Project
2. Requirments of project
3. ER Digram
4. Data flow digram
5. Coading
6. Output
7. Module
8. Conclusion
9. Future Scope
11 Reference
About the Institute or Company
IIT Kanpur was the first institute in India to start a Computer Science
department. IITK has a rich base of alumni in this space who have made a
remarkable impact around the world (Dr. Arvind Krishnan, CEO IBM, Dr.
Rajeev Motwani, Google mentor, Dr. Narayan Murthy, Founder Infosys, Mr.
Amit Agarwal, CTO Amazon to name a few).
While education is impacted some of the institutions continue to do well as they
have realized the importance of practice. There is no substitution to practice.
While other jobs are impacted due to COVID - 19 coding jobs are still in
demand.
Teaching introductory programming is difficult. The problems are:
• Unlike maths, students have varied exposure, some may be coding in
competitions and others may be working on them for the first time.
• How can we keep both groups engaged?
• Class size is large, which makes uniformity in grading and feedback
difficult
• Accomplish these objectives without using too many extra resources?
To solve this, Dr. Amey Karkare at IIT Kanpur has developed software - Prutor,
that is being used at IIT Mumbai, IIT Goa, IIT Kanpur, IISC Bangalore, and
IISER Bhopal.
Prutor is a proprietary technology of IIT Kanpur, developed under the guidance
of Prof Amey Karkare, Department of CSE, IIT Kanpur. To enhance and
widespread the software Prutor, this technology was Transferred to Robust
Results Private Limited in 2015 under revenue-sharing basis with IIT Kanpur.
Since 2015 Robust Results has been working under the guidance of Dr. Amey
and has added numerous features to the software. Prutor is also being used by
ICT Academy, IIT Kanpur for conducting courses - CSS and Python for AKTU
(33,000+, 2nd year BTech students).
Most of the IIT's and other top institutes in India are using Prutor. We are giving
you the opportunity to use Prutor. You can use the same paralogical approach as
used by IIT Kanpur to teach programming.
INTRODUCTION
Mini-project description — “Guess the number” game
One of the simplest two-player games is “Guess the number”. The first player thinks of a
secret number in some known range while the second player attempts to guess the number.
After each guess, the first player answers either “Higher”, “Lower” or “Correct!” depending
on whether the secret number is higher, lower or equal to the guess. In this project, you will
build a simple interactive program in Python where the computer will take the role of the first
player while you play as the second player.
You will interact with your program using an input field and several buttons. For this project,
we will ignore the canvas and print the computer's responses in the console. Building an
initial version of your project that prints information in the console is a development strategy
that you should use in later projects as well. Focusing on getting the logic of the program
correct before trying to make it display the information in some “nice” way on the canvas
usually saves lots of time since debugging logic errors in graphical output can be tricky.
 The first player thinks of an integer within a known range.
 The second player tries to guess the number.
 If the guess is incorrect, then the first player tells the second player whether the guess
was too high or too low.
 Eventually, the second player guesses the correct number.
 The second player's score equals the number of guesses he made.
 The players then reverse their roles and repeat the game.
 The winner is the player who gets the correct answer with the fewest guesses.
REQUIRMENTS
1. Project Title :
“Guess The Number Game”
2. Technology :
“Python”
3. Hardware and software Requirment :
 Opreating system – Windows xp,7,8 or above .
 Ram – 1Gb or above .
 Software – Visual studio code or pycharm .
 processor – 2.0 GH2 or above .
 Hard drive space – 1Gb or above .
ER Diagram
Enter the random number (0,7)
Wrong Please enter
lower number
Please enter
higher number
start
Right
Won
Exit
Guess was
right
DATA FLOW DIGRAM
COADING
# guess the number game in Python by CodeSpeedy.com
import random
random_number = random.randint(1,7)
win = False
Turns =0
while win==False:
Your_guess = input("Enter a number between 1 and 7 ")
Turns +=1
if random_number==int(Your_guess):
print("You won!")
print("Number of turns you have used: ",Turns)
win == True
break
else:
if random_number>int(Your_guess):
print("Your Guess was low, Please enter a higher number")
else:
print("your guess was high, please enter a lower number")
OUTPUT
Enter a number between 1 and 7 6
your guess was high, please enter a lower number
Enter a number between 1 and 7 5
You won!
Number of turns you have used: 2
MODULE
 Guess the number .
 Enter the number.
 You are wrong .
 Enter Again.
 You are right.
 You won.
 Exit.
CONCLUSION
My guessing game worked correctly as it followed most of the objectives. It told you if your
guess was too high or too low and if your guess was right it told you that also. It had a limit
between 1-07 so that it wasn’t too hard for people to guess. As well as this the final,
completed guessing game didn’t come up with error messages as it ran through the flow chart
each time a number was entered which shows that it was correct. It was only a basic version
and wasn’t expanded but it worked fine.
 Create a guessing game that told you if the number you put in was too high or too low
and then congratulated you when the number was correct.
 To use Crocodile Clips correctly and learn about the different things (edit boxes,
inputs) you use.
 To make sure your guessing game was correctly working through the whole thing.
 To have a correct loop that worked in the right way.
FUTURE SCOPE
 Flexibility - You can put as much time into the business as you'd like. If you
like the work and have some initial experience, you can start small and manage
all aspects of the business on your own.
 Ability to start your business from home - It's not necessary to have a
physical storefront or office space to get your business started. You can do
everything from the comfort of your own home, at least in the beginning!
 Little startup costs required - The cost to start a number guessing game
business costs significantly less money than most businesses, ranging anywhere
from 12 to 11,659.
 Rewarding work - Starting a number guessing game business can be really
rewarding work. After all, you are solving an immediate issue for your
customer and you're working on something you truly care about.
 Scalable - With businesses and processes changing daily, there will always be
demand for new features, products and services for your business. Additionally,
there are several different business models and pricing tiers you can implement
that will allow you to reach all types of customers.
 Traffic to your website - A number guessing game business gives people a
reason to visit your website and to keep coming back to you!
 No overhead costs - To get your number guessing game business started,
there are no costs associated with overhead, storage, packaging, etc. This will
save you a lot of time and money!
 Meaningful business connections - You never know who you will meet as
a number guessing game business. This could be the start of an incredible
business opportunity!
 High margins - The gross margins for your number guessing game business
are typically around 65%, which is considerably high and allows you to grow
your business and manage costs easily.
 Quick build time - The average time it takes to build your product is quick -
typically around 7 months. This will allow you to bring your product to market
faster.
 Control of workload - With starting a number guessing game business, you
have the unique ability to choose how little or how much you want to work.
You also have the freedom to decide which projects you want to work on, and
can turn down the ones that do not interest you.
 Unlimited income potential - With starting a number guessing game
business there is no cap as to how much income you can make. The stronger
your business skills and the more energy/time you put into your career, the
more you'll make.
 Simple business model - A number guessing game business has the
advantage of a simple business model, which makes launching and building the
business more seamless.
 Minimal experience required - Starting A Number Guessing Game
Business requires little experience and no specific certifications or
qualifications. To be successful, you need hard work, determination and the
desire to achieve greatness!
 You get to do something you truly love - With starting a number
guessing game business, you get to put your energy into something you are
truly passionate about! You'll find yourself devoting as much time and energy
as possible into the business to make it successful.
 Express your opinions - With starting a number guessing game business,
you can express your opinions and knowledge to your audience, which allows
you to build your own reputation and identity.
 You can work from anywhere - Not only can you start your number
guessing game business from home, you can also run your business from
anywhere in the world. This is the entrepreneur dream.
 Easy to Learn The Business - When starting your number guessing game
business, there is a ton of information readily available to you online (Facebook
groups, Youtube videos, Starter Story etc). This will help you get the business
started and answer any questions, doubts or concerns you may have.
 You get to inspire others - Your business is one that encourages and
inspires others, which in itself, can be very fulfilling.
 You establish yourself as an expert - With starting a number guessing
game business, you establish yourself as an expert in your niche, which builds
your credibility. In return, customers are more likely to trust you and refer you
to other friends and family.
 Various different ways to make money - With starting a number
guessing game business, there is not just one business model to choose from.
This field is amazing in that there are various different ways to make money.
Although this may complicate things, it's great to have different options and
sources of revenue.
 Make money while you sleep - The advantage of starting a number
guessing game business is that you have the ability to have passive income and
make money while you sleep. This is the dream for many entrepreneurs.
REFRENCE
 W3school.com
 Prutor@IITK
 YouTube
 Code with harry

guess the number project.docx

  • 2.
    Kali Charan NigamInstitute of Technology Banda (U.P) SESSION 2022-23 DEPARTMENT OF COMPUTER SCINCE AND ENGINEERING A MINI PROJECT REPORT (KCS-752) ON “Guess The Number Game” Submitted in partial Fulfillments to the requirement for the degree Of Bachelor of Technology In Computer Science & Engineering Under the guidance Of Mr. Pradeep Sachan Submitted To: Submitted By: Mr. Ashish Srivastava Kaushal dwivedi Assistant professor of CS department Roll No: 2101390100036
  • 4.
    S.NO TITLE PAGE.NO. 1.Introduction of Project 2. Requirments of project 3. ER Digram 4. Data flow digram 5. Coading 6. Output 7. Module 8. Conclusion 9. Future Scope 11 Reference
  • 6.
    About the Instituteor Company IIT Kanpur was the first institute in India to start a Computer Science department. IITK has a rich base of alumni in this space who have made a remarkable impact around the world (Dr. Arvind Krishnan, CEO IBM, Dr. Rajeev Motwani, Google mentor, Dr. Narayan Murthy, Founder Infosys, Mr. Amit Agarwal, CTO Amazon to name a few). While education is impacted some of the institutions continue to do well as they have realized the importance of practice. There is no substitution to practice. While other jobs are impacted due to COVID - 19 coding jobs are still in demand. Teaching introductory programming is difficult. The problems are: • Unlike maths, students have varied exposure, some may be coding in competitions and others may be working on them for the first time. • How can we keep both groups engaged? • Class size is large, which makes uniformity in grading and feedback difficult • Accomplish these objectives without using too many extra resources? To solve this, Dr. Amey Karkare at IIT Kanpur has developed software - Prutor, that is being used at IIT Mumbai, IIT Goa, IIT Kanpur, IISC Bangalore, and IISER Bhopal. Prutor is a proprietary technology of IIT Kanpur, developed under the guidance of Prof Amey Karkare, Department of CSE, IIT Kanpur. To enhance and widespread the software Prutor, this technology was Transferred to Robust Results Private Limited in 2015 under revenue-sharing basis with IIT Kanpur. Since 2015 Robust Results has been working under the guidance of Dr. Amey and has added numerous features to the software. Prutor is also being used by ICT Academy, IIT Kanpur for conducting courses - CSS and Python for AKTU (33,000+, 2nd year BTech students). Most of the IIT's and other top institutes in India are using Prutor. We are giving you the opportunity to use Prutor. You can use the same paralogical approach as used by IIT Kanpur to teach programming.
  • 7.
    INTRODUCTION Mini-project description —“Guess the number” game One of the simplest two-player games is “Guess the number”. The first player thinks of a secret number in some known range while the second player attempts to guess the number. After each guess, the first player answers either “Higher”, “Lower” or “Correct!” depending on whether the secret number is higher, lower or equal to the guess. In this project, you will build a simple interactive program in Python where the computer will take the role of the first player while you play as the second player. You will interact with your program using an input field and several buttons. For this project, we will ignore the canvas and print the computer's responses in the console. Building an initial version of your project that prints information in the console is a development strategy that you should use in later projects as well. Focusing on getting the logic of the program correct before trying to make it display the information in some “nice” way on the canvas usually saves lots of time since debugging logic errors in graphical output can be tricky.  The first player thinks of an integer within a known range.  The second player tries to guess the number.  If the guess is incorrect, then the first player tells the second player whether the guess was too high or too low.  Eventually, the second player guesses the correct number.  The second player's score equals the number of guesses he made.  The players then reverse their roles and repeat the game.  The winner is the player who gets the correct answer with the fewest guesses.
  • 8.
    REQUIRMENTS 1. Project Title: “Guess The Number Game” 2. Technology : “Python” 3. Hardware and software Requirment :  Opreating system – Windows xp,7,8 or above .  Ram – 1Gb or above .  Software – Visual studio code or pycharm .  processor – 2.0 GH2 or above .  Hard drive space – 1Gb or above .
  • 9.
    ER Diagram Enter therandom number (0,7) Wrong Please enter lower number Please enter higher number start Right Won Exit Guess was right
  • 10.
  • 11.
    COADING # guess thenumber game in Python by CodeSpeedy.com import random random_number = random.randint(1,7) win = False Turns =0 while win==False: Your_guess = input("Enter a number between 1 and 7 ") Turns +=1 if random_number==int(Your_guess): print("You won!") print("Number of turns you have used: ",Turns) win == True break else: if random_number>int(Your_guess): print("Your Guess was low, Please enter a higher number") else: print("your guess was high, please enter a lower number")
  • 12.
    OUTPUT Enter a numberbetween 1 and 7 6 your guess was high, please enter a lower number Enter a number between 1 and 7 5 You won! Number of turns you have used: 2 MODULE  Guess the number .  Enter the number.  You are wrong .  Enter Again.  You are right.  You won.  Exit.
  • 13.
    CONCLUSION My guessing gameworked correctly as it followed most of the objectives. It told you if your guess was too high or too low and if your guess was right it told you that also. It had a limit between 1-07 so that it wasn’t too hard for people to guess. As well as this the final, completed guessing game didn’t come up with error messages as it ran through the flow chart each time a number was entered which shows that it was correct. It was only a basic version and wasn’t expanded but it worked fine.  Create a guessing game that told you if the number you put in was too high or too low and then congratulated you when the number was correct.  To use Crocodile Clips correctly and learn about the different things (edit boxes, inputs) you use.  To make sure your guessing game was correctly working through the whole thing.  To have a correct loop that worked in the right way.
  • 14.
    FUTURE SCOPE  Flexibility- You can put as much time into the business as you'd like. If you like the work and have some initial experience, you can start small and manage all aspects of the business on your own.  Ability to start your business from home - It's not necessary to have a physical storefront or office space to get your business started. You can do everything from the comfort of your own home, at least in the beginning!  Little startup costs required - The cost to start a number guessing game business costs significantly less money than most businesses, ranging anywhere from 12 to 11,659.  Rewarding work - Starting a number guessing game business can be really rewarding work. After all, you are solving an immediate issue for your customer and you're working on something you truly care about.  Scalable - With businesses and processes changing daily, there will always be demand for new features, products and services for your business. Additionally, there are several different business models and pricing tiers you can implement that will allow you to reach all types of customers.  Traffic to your website - A number guessing game business gives people a reason to visit your website and to keep coming back to you!  No overhead costs - To get your number guessing game business started, there are no costs associated with overhead, storage, packaging, etc. This will save you a lot of time and money!  Meaningful business connections - You never know who you will meet as a number guessing game business. This could be the start of an incredible business opportunity!
  • 15.
     High margins- The gross margins for your number guessing game business are typically around 65%, which is considerably high and allows you to grow your business and manage costs easily.  Quick build time - The average time it takes to build your product is quick - typically around 7 months. This will allow you to bring your product to market faster.  Control of workload - With starting a number guessing game business, you have the unique ability to choose how little or how much you want to work. You also have the freedom to decide which projects you want to work on, and can turn down the ones that do not interest you.  Unlimited income potential - With starting a number guessing game business there is no cap as to how much income you can make. The stronger your business skills and the more energy/time you put into your career, the more you'll make.  Simple business model - A number guessing game business has the advantage of a simple business model, which makes launching and building the business more seamless.  Minimal experience required - Starting A Number Guessing Game Business requires little experience and no specific certifications or qualifications. To be successful, you need hard work, determination and the desire to achieve greatness!  You get to do something you truly love - With starting a number guessing game business, you get to put your energy into something you are truly passionate about! You'll find yourself devoting as much time and energy as possible into the business to make it successful.  Express your opinions - With starting a number guessing game business, you can express your opinions and knowledge to your audience, which allows you to build your own reputation and identity.
  • 16.
     You canwork from anywhere - Not only can you start your number guessing game business from home, you can also run your business from anywhere in the world. This is the entrepreneur dream.  Easy to Learn The Business - When starting your number guessing game business, there is a ton of information readily available to you online (Facebook groups, Youtube videos, Starter Story etc). This will help you get the business started and answer any questions, doubts or concerns you may have.  You get to inspire others - Your business is one that encourages and inspires others, which in itself, can be very fulfilling.  You establish yourself as an expert - With starting a number guessing game business, you establish yourself as an expert in your niche, which builds your credibility. In return, customers are more likely to trust you and refer you to other friends and family.  Various different ways to make money - With starting a number guessing game business, there is not just one business model to choose from. This field is amazing in that there are various different ways to make money. Although this may complicate things, it's great to have different options and sources of revenue.  Make money while you sleep - The advantage of starting a number guessing game business is that you have the ability to have passive income and make money while you sleep. This is the dream for many entrepreneurs.
  • 17.