Inno Valley Works interview question

Print patterns using for loop