In this we are going to see how to print the above pattern of right angle triangle of a number, using nested for loops in Python Programming Language.
print("\nEnter the number of rows\n", end='')
rows = int(input())
print("\n", end='')
for i in range(1, rows + 1):
j = 1
while j <= i:
print("1", end='')
j += 1
print("\n", end='')
# Coded by Sahil Shaikh
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP