Advertisement
horozov86

7. Patterns - Lab: Basic Syntax, Conditional Statements, and Loops

Jan 13th, 2023
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. number = int(input())
  2.  
  3. for i in range(1, number + 1):
  4.     for j in range(0, i):
  5.         print("*", end="")
  6.     print()
  7.  
  8. for i in range(number - 1, 0, -1):
  9.     for j in range(0, i):
  10.         print("*", end="")
  11.     print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement