This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
postgres: | |
ports: | |
- 5432:5432 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "Let's play a game of number guessing from 1 to 100!" | |
hidden_value = rand(1..100) | |
max_guesses = 10 | |
winner = false | |
attempt = 1 | |
while attempt <= max_guesses && !winner do | |
puts "Guess #{attempt}/#{max_guesses}: What do you think the number is?" | |
my_guess = gets.chomp.to_i |