Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Star_pattern
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# python3 code to print pyramid pattern using while loop

# input
n=5

i=1;j=0
# while loop check the condition until the
# condition become false. if it is true then
# enter in to loop and print the pattern
while(i<=n):
while(j<=i-1):
print("* ",end="")
j+=1
# printing next line for each row
print("\r")
j=0;i+=1