Skip to content

Latest commit

 

History

History
55 lines (33 loc) · 2.07 KB

README.md

File metadata and controls

55 lines (33 loc) · 2.07 KB

Project 0. Guess the number

Contents

1. Project description
2. What case are we solving?
3. Brief information about the data
4. Stages of work on the project
5. Results
6. Conclusions

Project description

Guess the number guessed by the computer in the minimum number of attempts.

⬆️to contents

What case are we solving?

We need to write a program that guesses a number in the minimum number of attempts.

Competition conditions:

  • The computer guesses an integer from 0 to 100, and we need to guess it. By “guess” we mean “write a program that guesses the number”.
  • The algorithm takes into account information about whether the random number is greater or less than what we need.

Quality Metric
Results are assessed by the average number of attempts per 1000 repetitions

What are we practice ?
Learning to write good Python code

Brief information about the data

The randit function of the numpy library randomly generates numbers from 1 to 100 in 1000 attempts, and my algorithm tries to guess the hidden number in the least number of attempts

⬆️to contents

Stages of working on the project

Two functions were written: a function for guessing a number and a function for testing the algorithm for guessing a number. By running the second function I got the desired result.

⬆️to contents

Results:

My algorithm guesses the number in an average of 5 attempts.

⬆️to contents

Conclusions:

I consider the results of the algorithm to be satisfactory.

⬆️to contents

If the information on this project seems interesting or useful to you, then I will be very grateful to you if you mark the repository and profile by ⭐️⭐️⭐️