Help with my beginner\'s Ruby code. 1 gradebook Hash.new 3 5.times do 4 puts \"E
ID: 3590917 • Letter: H
Question
Help with my beginner's Ruby code.
Explanation / Answer
STDOUT.flush
#initialized i=0 and counter till 5 input
$i = 0
$num = 5
while $i < $num do
name=gets.chomp
# gets name
values1 = []
values1.push(name)
grade=gets.chomp
# gets grade
values1.push(grade)
string_value = values1.join(":")
puts string_value
print " "
end
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.