Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 704 Bytes

README.md

File metadata and controls

14 lines (9 loc) · 704 Bytes

Guess the Number

"Guess the Game" game written in bash. The concept is very simple:

After startup, the script will randomly generate a number between 1 and 100. The game asks you what you think it is. Then 4 options are possible:

  • If it's higher than the number the script "thinks" it is, it prints out that it's higher and asks again.
  • If it is less than the script "thinks" it will print lower and ask again.
  • If you hit it, it will tell you that you are good :)
  • And it has error handling in case you enter the wrong number.

guess-the-number-bash

Update: The code has been optimized.