Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)