Printing Pattern

Problem Statement

You will be given a number N denoting the number of rows. Print the following type Pattern.

N = 5
* * * * *
* * * *
* * *
* *
*

Input Format:

An integer N denoting the number of rows.

Output Format:

Print the following type of pattern:

Constraints:

  • N is an integer greater than or equal to 1.
Sample Input
Sample Output

Solution

file_type_python count_of_family_members.py
n = int(input())
for i in range(n, 0, -1):
    print('* ' * i)

Comments

Load Comments