Computer Science, asked by srivastavamit020, 7 hours ago

how to create S pattern in python.

Answers

Answered by Aditya456789
2

Pattern - 1: Number Pattern

  1. rows = int(input("Enter the number of rows: "))
  2. # Outer loop will print number of rows.
  3. for i in range(rows+1):
  4. # Inner loop will print the value of i after each iteration.
  5. for j in range(i):
  6. print(i, end=" ") # print number.
  7. # line after each row to display pattern correctly.
  8. print(" ")

HOPE IT HELPS!!!!

PLEASE MARK ME AS BRAINLIEST!!!!

Similar questions