Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nobleknightt/guess-the-number
🔎 "guess the number" game in various programming languages
https://github.com/nobleknightt/guess-the-number
bash c cpp csharp dart golang groovy guess-the-number java kotlin lua python ruby
Last synced: about 5 hours ago
JSON representation
🔎 "guess the number" game in various programming languages
- Host: GitHub
- URL: https://github.com/nobleknightt/guess-the-number
- Owner: nobleknightt
- License: gpl-3.0
- Created: 2021-09-03T05:15:26.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-26T12:42:59.000Z (about 3 years ago)
- Last Synced: 2024-06-14T02:07:34.584Z (5 months ago)
- Topics: bash, c, cpp, csharp, dart, golang, groovy, guess-the-number, java, kotlin, lua, python, ruby
- Language: Java
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## `🔎 guess the number`
"guess the number" game in various programming languages> program picks a random number between 1 and 100, and asks user to guess it.
> for each guess, program gives feedback on the number entered by user, whether it is smaller, larger or equal.## `🎯 sample run`
```
guess a number between 1 and 100
> 50
too low!
> 75
too high!
> 67
too low!
> 73
too high!
> 70
that's right!
```## `💡 trick`
> any random number between 1 to 100 can be guessed in maximum of 7 turns by applying binary search logic.## `📚 references`
- [learn `lua` by writing a "guess the number" game](https://opensource.com/article/20/12/lua-guess-number-game) by [seth kenlon](https://opensource.com/users/seth) on [opensource.com](https://opensource.com)
- [learn `bash` by writing an interactive game](https://opensource.com/article/20/12/learn-bash) by [jim hall](https://opensource.com/users/jim-hall) on [opensource.com](https://opensource.com)
- [practice coding in `groovy` by writing a game](https://opensource.com/article/20/12/groovy) by [chris hermansen](https://opensource.com/users/clhermansen) on [opensource.com](https://opensource.com)