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 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

Source: geeksforgeeks | 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(N):
			for j in range(N - i):
				print('* ', end='')
			print()


class Solution:

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


class Solution:

	def printTriangle(self, N):
		for i in range(N):
			strs = '* ' * (N - i)
			print(strs)


class Solution:

	def printTriangle(self, N):
		for x in range(N, 0, -1):
			if x == 1:
				print('*')
				break
			print('* ' * x)


class Solution:

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


class Solution:

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


class Solution:

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


class Solution:

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


class Solution:

	def printTriangle(self, N):
		for i in range(N, 0, -1):
			for j in range(i):
				a = i
			print('* ' * i)


class Solution:

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


class Solution:

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


class Solution:

	def printTriangle(self, N):
		for x in range(N, 0, -1):
			for y in range(x):
				print('*', end=' ')
			print()
		return


class Solution:

	def printTriangle(self, N):
		arr = list(range(1, N + 1))
		arr.sort(reverse=True)
		for item in arr:
			print('* ' * item)


class Solution:

	def printTriangle(self, n):
		for i in range(n):
			print((n - i) * '* ')


class Solution:

	def printTriangle(self, n):
		for j in range(n, 0, -1):
			print('* ' * j)