Hi I'm doing an assignment where we take a cvs and try to explain what's happening.

I'm stuck with this part right here and I was wondering if anyone could explain to me step by step what is going on here: :

```
y=0
> n=0
> for(i in seq(1,nrow(matches_data)))
+ {
+ if (matches_data$toss_winner[i] == matches_data$winner[i])
+ y=y+1
+ else
+ n=n+1
+ }
>
> if (y >= n)
+ {
+ print(paste("Yes, Toss-winning helped in winning matches."))
+ print(paste("Matches won by toss_winner are: ", y, "& Total matches: ", nrow(matches_data)))
+ } else
+
+ {
+ print(paste("No, Toss-winning didn't help in winning matches."))
+ print(paste("Matches won by other team are: ", n, "& Total matches: ", nrow(matches_data)))
+ }
[1] "Yes, Toss-winning helped in winning matches."
[1] "Matches won by toss_winner are: 325 & Total matches: 636"
> ## [1] "Yes, Toss-winning helped in winning matches."
> ## [1] "Matches won by toss_winner are: 325 & Total matches: 636"
```