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
Guess the number guessed by the computer in the minimum number of attempts.
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
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
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.
My algorithm guesses the number in an average of 5 attempts.
I consider the results of the algorithm to be satisfactory.
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 ⭐️⭐️⭐️