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).
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started