First we need to Understand what rows are. For example,…