How to add values to an array of a Ruby array?

Asked

Viewed 224 times

4

puts "Alunos\n\n"

alunos = [["Daniel: ", "Nota: 10\n\n"],["Abima: ", "Nota: 10\n\n"], ["Wilame: ", "Nota: 10\n\n"],["Felipe: ","Nota: 10\n\n"]]

puts alunos

I wonder if it is possible to add a new student with a new note as a new array in the above matrix, so the parameters would have to be typed in the terminal.

1 answer

4


Browser other questions tagged

You are not signed in. Login or sign up in order to post.