Question: how can I create a function in python that does the following: def game_board(size, tokens) In particular, the first row (position 0 in the list)

how can I create a function in python that does the following:
def game_board(size, tokens)
In particular, the first row (position 0 in the list) should have 1 token, the second should have 2 tokens and so-forth, up until we hit token max after which each position should have token max tokens.
Example: game_board(5, 3) you should get the list [1,2,3,3,3] as a return value.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!