ShriRam Changed status to publish August 21, 2023
s = int(input(“Please enter the number of rows : “))
i = 1
# the outer loop prints the number of rows
while i <= s:
j = 1
while j <= i:
# we are printing the odd values by the below formula
print((i * 2 - 1), end=" ")
j = j + 1
i = i + 1
print()
ShriRam Changed status to publish August 21, 2023