- To print half triangle pattern using *
User Input: 4
Output:
* * * * * * * * * *
rows=int(input("Enter number of rows : "))
for i in range(1,rows+1):
for j in range(1,i+1):
print("* ", end="")
print("")
Enter number of rows : 4 * * * * * * * * * *Program
Main logic :
for i in range(1,rows+1): #rows : number of rows to print
for j in range(1,i+1):
print("* ", end="")
print("")
You can print any thing in this pattern, just replace your value with *
Coming Soon !
QuickPractice isn’t the thing you do once you’re good. It’s the thing you do that makes you good.