Advertisement
Yahya-Ak-Ayoub

Q1

Mar 19th, 2021
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. input = int(input("Enter length of stars line"))
  2. output = ""
  3. for i in range(0,input) :
  4.     for j in range(0,input-i):
  5.        output+='*'
  6.     for j in range(0,i*2):
  7.        output+=' '
  8.     for j in range(0,input-i):
  9.        output+='*'
  10.     output+="\n"
  11. print(output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement