# Grains

Write a program that calculates the number of grains of wheat on a chessboard given that the number on each square is double the previous one.

There are 64 squares on a chessboard.

#Example:
square(1) = 1
square(2) = 2
square(3) = 4
square(4) = 8
etc...

Write a program that shows how many grains were on each square

Difficulty: EASY
Starter code: def square(number):
	

Solutions:
def square(number):
	return 2 ** (number - 1)


def square(n):
	return 1 << n - 1


square = lambda n: 2 ** (n - 1)


def square(number):
	return 1 << number - 1


square = lambda n: 1 << n - 1


square = lambda a: 1 << a - 1


def square(number):
	grains = 1
	for x in range(number - 1):
		grains *= 2
	return grains


def square(number):
	a = []
	sum = 1
	while len(a) < number:
		a.append(sum)
		sum = sum + sum
	return a[-1]


def square(number):
	lista = [1]
	for n in range(1, number):
		result = lista[-1] * 2
		lista.append(result)
	return lista[-1]