Answers for "print star pattern in python"

0

star pattern in python

# Python 3.x code to demonstrate star pattern
 
# Function to demonstrate printing pattern
def pypart(n):
    myList = []
    for i in range(1,n+1):
        myList.append("*"*i)
    print("n".join(myList))
 
# Driver Code
n = 5
pypart(n)
Posted by: Guest on June-02-2021
0

* pattern by python

def pattern(n):    
  for i in range(0,n):       
    for j in range(0, i+1): 
      print("* " , end="")         
      print("r") pattern(5
Posted by: Guest on December-02-2020

Code answers related to "print star pattern in python"

Python Answers by Framework

Browse Popular Code Answers by Language