<commit_before>#!/usr/bin/env ruby

#
# Bonus problem: If you’re feeling the need for a little more, write
# a program that picks a random number. Let a player guess the
# number, telling the player whether the guess is too low or too high.
#
# (Hint: rand(10) will generate a random number from 0 to 9, and
# gets will read a string from the keyboard that you can translate to
# an integer.)
#


number = rand(100)

guess = gets.to_i

while guess != number
    if guess < number
        puts 'Too low'
    else
        puts 'Too high'
    end
    guess = gets.to_i
end<commit_msg>Refactoring number guessing game.<commit_after>#!/usr/bin/env ruby

#
# Bonus problem: If you’re feeling the need for a little more, write
# a program that picks a random number. Let a player guess the
# number, telling the player whether the guess is too low or too high.
#
# (Hint: rand(10) will generate a random number from 0 to 9, and
# gets will read a string from the keyboard that you can translate to
# an integer.)
#


number = rand(100)

begin
    guess = gets.to_i
    if guess < number
        puts 'Too low'
    elsif guess > number
        puts 'Too high'
    end
end while guess != number

{'fraction_non_alphanumeric': 0.07419898819561552, 'fraction_numerical': 0.011804384485666104, 'mean_word_length': 3.023728813559322, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7302631', 'n_tokens_mistral': 369, 'n_tokens_neox': 357, 'n_words': 177}