Python Pattern Programs
Python Pattern Programs Pattern-1: To print a given number of *s in a row test.py 1) n=int(input('Enter n value:')) 2) for i in range(n): 3) print('*',end=' ') Output: Enter n value:5 * * * * * Pattern-2: To print a square pattern with * symbols test.py 1) n=int(input('Enter No Of Rows:')) 2) for i in range(n): 3) print('* '*n) Output: Enter No Of Rows:5 * * * * * * * * * * * * * * * * * * * * * * * * * Pattern-3: To print a square pattern with provided fixed digit in every row test.py 1) n=int(input('Enter No Of Rows:')) 2) for i in range(n): 3) print((str(i+1)+' ')*n) Output: Enter No Of Rows:5 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5 Pattern-4: To print a square pattern with alphabet symbols test.py ...