Write function `makeParts` or `make_parts` (depending on your language) that will take an array as argument and the size of the chunk.

Example: if an array of size 123 is given and chunk size is 10 there will be 13 parts, 12 of size 10 and 1 of size 3.

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Starter code: def makeParts(arr, chunkSize):
	

Solutions:
def makeParts(arr, csize):
	return [arr[i:i + csize] for i in range(0, len(arr), csize)]


def makeParts(arr, chunkSize):
	return [arr[i:i + chunkSize] for i in range(0, len(arr), chunkSize)]


def makeParts(arr, chunkSize):
	r = list()
	while arr:
		r.append(arr[0:chunkSize])
		arr = arr[chunkSize:]
	return r


def makeParts(arr, chunkSize):
	lst = []
	for i in range(0, len(arr), chunkSize):
		lst.append(arr[i:i + chunkSize])
	return lst


def makeParts(arr, size):
	return [arr[i:i + size] for i in range(0, len(arr), size)]


import math

def makeParts(arr, size):
	c = [[] for i in range(math.ceil(len(arr) / size))]
	for i in range(len(arr)):
		c[int(i / size)].append(arr[i])
	return c


def makeParts(arr, chunk_size):
	return [arr[i:i + chunk_size] for i in range(0, len(arr), chunk_size)]


from math import ceil
makeParts = lambda arr, c: [arr[i * c:i * c + c] for i in range(ceil(len(arr) / c))]


def makeParts(arr, chunkSize):
	store = []
	while len(arr) >= chunkSize:
		store.append(arr[:chunkSize])
		arr = arr[chunkSize:]
	if len(arr) > 0:
		store.append(arr)
	return store