need some help with an assignment

I think this technically comes under the FAQ: Homework Policy so I am not sure how much direct explanation is acceptable but at a start have a look at For loops and, perhaps
read the help entries and their examples for

?seq
?nrow

If this does not help please come back and someone here should be able to answer specific questions.

Just to be on the save side, can you supply a FAQ: How to do a minimal reproducible example ( reprex ) for beginners ?

1 Like