Geek is very fond of patterns. Once, his teacher gave him a pattern to solve. He gave Geek an integer n and asked him to build a pattern.
Help Geek to build a star pattern.
 
Example 1:
Input: 5
Output:
* 
* * 
* * * 
* * * * 
* * * * *
 
Your Task:
You don't need to input anything. Complete the function printTriangle() which takes  an integer n  as the input parameter and print the pattern.
Constraints:
	1<= N <= 20

Difficulty: EASY
Starter code: #User function Template for python3



class Solution:

    def printTriangle(self, N):

        # Code here

Solutions:
class Solution:

	def printTriangle(self, N):
		for i in range(1, N + 1):
			print('* ' * i)


class Solution:

	def printTriangle(self, n):
		for i in range(0, n):
			for j in range(0, i + 1):
				print('*', end=' ')
			print()


class Solution:

	def printTriangle(self, N):
		for element in range(1, N + 1):
			print('* ' * element)


class Solution:

	def printTriangle(self, N):
		if N <= 20 and N >= 1:
			for i in range(N):
				for j in range(i + 1):
					print('*', end=' ')
				print()


class Solution:

	def printTriangle(self, N):
		for x in range(1, N + 1):
			print('* ' * x)


class Solution:

	def printTriangle(self, N):
		for i in range(N):
			for j in range(1, i + 2):
				print('*', end=' ')
			print()


class Solution:

	def printTriangle(self, N):
		for i in range(1, N + 1):
			for j in range(i):
				print('*', end=' ')
			print(sep='\n')


class Solution:

	def printTriangle(self, N):
		result = ''
		for i in range(N):
			for j in range(0, i + 1, 1):
				result += '* '
			if i != N - 1:
				result += '\n'
		print(result)


class Solution:

	def printTriangle(self, N):
		for i in range(0, N):
			print('* ', end='')
			for j in range(1, N):
				if j <= i:
					print('* ', end='')
					j += 1
			i += 1
			print()


class Solution:

	def printTriangle(self, N):
		i = 0
		while i < N:
			j = 0
			while j <= i:
				print('*', end=' ')
				j += 1
			print()
			i += 1


class Solution:

	def printTriangle(self, n):
		for i in range(1, n + 1):
			s = '* ' * i
			print(s)


class Solution:

	def printTriangle(self, N):
		for row in range(N):
			for col in range(row + 1):
				print('*', end=' ')
			print()