Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,14 @@
ary = (1..20).to_a.shuffle.each_slice(4).to_a
p ary
catch :found_it do
for row in ary
for element in row
print "%2d " % element
throw :found_it if element == 20
end
puts ","
end
end
puts "done"

View file

@ -0,0 +1,10 @@
p slices = [*1..20].shuffle.each_slice(4)
slices.any? do |slice|
puts
slice.any? do |element|
print "#{element} "
element == 20
end
end
puts "done"