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 the pattern.
 
Example 1:
Input: 5
Output:
1 
2 3 
4 5 6 
7 8 9 10 
11 12 13 14 15
 
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):
		x = 1
		for i in range(1, N + 1):
			for j in range(0, i):
				print(x, end=' ')
				x = x + 1
			print()


class Solution:

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


class Solution:

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


class Solution:

	def printTriangle(self, N):
		count = 0
		for x in range(1, N + 1):
			for y in range(1, x + 1):
				count = count + 1
				print(count, end=' ')
			print()


class Solution:

	def printTriangle(self, N):
		t = 1
		for i in range(N):
			for j in range(i + 1):
				print(t, end=' ')
				t = t + 1
			print()
		return []


class Solution:

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


class Solution:

	def printTriangle(self, N):
		temp = 1
		for i in range(1, N + 1):
			for x in range(i):
				print(temp, end=' ')
				temp += 1
			print()
		return


class Solution:

	def printTriangle(self, N):
		st = 1
		for i in range(1, N + 1):
			s = ''
			for j in range(st, st + i):
				s += str(j) + ' '
			print(s)
			st = j + 1


class Solution:

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


class Solution:

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


class Solution:

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


class Solution:

	def printTriangle(self, N):
		num = 1
		for i in range(N, 0, -1):
			for k in range(N - (i - 1)):
				print(num, end=' ')
				num += 1
			print()


class Solution:

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


class Solution:

	def printTriangle(self, N):
		num = 1
		for i in range(1, N + 1):
			for j in range(i):
				if j != i - 1:
					print(num, end=' ')
				else:
					print(num, end='\n')
				num += 1


class Solution:

	def printTriangle(self, N):
		count = 1
		for i in range(0, N):
			for j in range(0, N):
				if j <= i:
					print(count, end=' ')
					count = count + 1
				else:
					break
			print('\n', end='')