217k views
0 votes
Write a function called print_function that takes integer number as argument and prints the following pattern if input is 3

*
**
***

1 Answer

0 votes

def print_function(x):

for i in range (x+1):

for j in range (i):

print ("*",end="")

print (" ")

return ()

User James Brewer
by
8.1k points