Write a program to achieve below pattern :
1 1 1 1
2 2 2 2
3 3 3 3
4 4 4 4
Write a program to achieve below pattern :
1 1 1 1
2 2 2 2
3 3 3 3
4 4 4 4
for i in range(1, 5): # outer loop for rows
for j in range(1, 5): # inner loop for columns
print(i, end=" ") # print the value of i with a space
print() # move to the next line after printing each row
for i in range(1,5):
for j in range(1,5):
print(i,end=" ")
print()
start_parameter = int(input('Enter rhe start range parameter: '))
end_parameter = int(input('Enter rhe end range parameter: '))
for i in range(start_parameter, end_parameter+1):
for j in range(end_parameter):
print(i, end = ' ')
print()
for i in range (1,5): # Executing rows
for j in range(1,5): # Executing column
print(i, end=" ") # printing outcomes with spaces
print() # shift to the next line after getting the outcome
for i in range(1, 5): # First loop to print the row numbers
for j in range(4): # Second loop to print the column values
print(i, end=’ ')
print() # Move to the next line after each row is printed
for i in range(1, 5): # loop through each row
for j in range(1, 5): # loop through each column in the current row
print(i, end=" ") # print the current row number, followed by a space
print() # move to the next line after each row
n=4
for i in range(1,n+1):
print((str(i)+’ ')*n)