Question: Python Question Task 4 Create a function named poker_table that uses Turtle Graphics to create a single poker table to accommodate all players. There should

Python Question

Task 4

Create a function named poker_table that uses Turtle Graphics to create a single poker table to accommodate all players. There should be four parameters: num_players indicates the number of players; side_length indicates the length in pixels of each side of the table; and x and y, which give the location where you should start drawing the table.

The poker table should be a simple regular polygon (that is, with sides of equal length). The number of sides of the table should be equal to the number of players (so that all players can sit at one table).

Python Question Task 4 Create a function named poker_table that uses Turtle

Notes:

The window should be at least 500 pixels x 500 pixels.

When calling the function, the values passed to the function may vary but make sure the whole table is visible within the window. Here are some sample parameter values to help you get started:

12 players with a side length of 50 pixels

36 players with a side length of 20 pixels.

Hint #1: The angle the turtle will need to turn should be 360 divided by the number of sides.

Hint #2: Try using a for loop to generate the table.

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!