Created
January 21, 2011 06:20
-
-
Save NeMO84/789319 to your computer and use it in GitHub Desktop.
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
array1 = [1, 2, 3, 4] | |
array2 = %w{peter piper picked peppers} | |
array3 = [] | |
# You need to write some code in this part | |
# to make the program output "Success" | |
array3 = array1.collect{|i| i.to_s}.zip(array2).flatten | |
if array3 == ['1', 'peter', '2', 'piper', '3', 'picked', '4', 'peppers'] | |
puts "Success" | |
else | |
puts "Failed" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment