Skip to content

Instantly share code, notes, and snippets.

@Papillard
Created October 13, 2014 10:32
Show Gist options
  • Save Papillard/6e3708596071a3ea0648 to your computer and use it in GitHub Desktop.
Save Papillard/6e3708596071a3ea0648 to your computer and use it in GitHub Desktop.
Loto interface for Re-Boot challenge @lewagon
def pick_number()
puts "pick a number please"
gets.chomp.to_i
end
def display_grid(grid)
grid.each_with_index do |num, index|
puts "Numero #{index + 1} => #{num}"
end
end
loto_grid = (1..10).to_a.shuffle.take(3)
my_grid = []
3.times { my_grid << pick_number() }
puts "Your grid:"
display_grid(my_grid)
puts "The winning grid:"
display_grid(loto_grid)
loto_result(my_grid, loto_grid)
@judepim
Copy link

judepim commented Oct 13, 2014

quel talent!

@piadiribarne
Copy link

bravo Juju !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment