我让 Ruby 要求用户五次输入名称,并希望每行都吐出答案,以大写和小写交替出现。下面是我所做的,它打印出每个名字两次,一个大写一个小写。但我只想让每一行在大写和小写之间交替。我希望我在这里有意义...
Football_team = []
5.times do
puts "Please enter a UK football team:"
Football_team << gets.chomp
end
Football_team.each do |Football_team|
puts team.upcase
puts team.downcase
end