Tables
Data Structures
So basically turn an integer into a table of all the numbers from zero to that number
def int_to_table(num):
tab = []
for x in range(num + 1):
tab.append(x)
print(tab)
return tab
import codewars_test as test
# TODO Write tests
import solution # or from solution import example
# test.assert_equals(actual, expected, [optional] message)
@test.describe("Example")
def test_group():
@test.it("test case")
def test_case():
test.assert_equals(int_to_table(9), [0,1,2,3,4,5,6,7,8,9])
test.assert_equals(int_to_table(7), [0,1,2,3,4,5,6,7])
test.assert_equals(int_to_table(4), [0,1,2,3,4])