Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have been stuck on this for a while. The code is done using python and turtle. Really could use the help and it would

I have been stuck on this for a while. The code is done using python and turtle. Really could use the help and it would be greatly appreciated. Thank you.

image text in transcribed

image text in transcribed

In this section of the lab you will create code that will draw either a square or a circle in a particular location on the screen. Those locations are Top Left, Top Right, Bottom Left and Bottom Right. The user will determine the shape as well as the pen color and fill. Based on these decisions your code will need to do the following: Top Left Location: the pen size must be 3 Top Right Location: the pen size must be 5 Bottom Left Location: the pen size must be 7 Bottom Right Location: the pen size must be 9 Circles: When the user selects a circle the program needs to ask the user for the pen color. The choices are red, blue or yellow. All of the pen colors will determine a specific fill color. Explore Appendix D in your book to find a new fill color. Squares: When the user selects a square the program needs to ask the user for a fill color. The choices are red, blue or yellow. These colors will determine the pen color. Pick a different color from Appendix D. For help with the location of your turtle, check out the section of your book in chapter 2 titled Moving the Turtle to a Specific Location. Also you will want to clear your screen and pause the execution of your code to give a little time between drawing the circle, square and triangle to drawing your new diagrams. To do that import the time library and clear your screen. Here is the code: import time #typed in at the top time. sleep (3) turtle.reset() turtle.setup (600, 600) #sets up the size of the window Additionally, since you have code from the first part of the assignment that works, comment that out while writing the new code. This will save time running and testing your code. Below are a few screen shots displaying what your output should look like. Keep in mind your colors will be different In this section of the lab you will create code that will draw either a square or a circle in a particular location on the screen. Those locations are Top Left, Top Right, Bottom Left and Bottom Right. The user will determine the shape as well as the pen color and fill. Based on these decisions your code will need to do the following: Top Left Location: the pen size must be 3 Top Right Location: the pen size must be 5 Bottom Left Location: the pen size must be 7 Bottom Right Location: the pen size must be 9 Circles: When the user selects a circle the program needs to ask the user for the pen color. The choices are red, blue or yellow. All of the pen colors will determine a specific fill color. Explore Appendix D in your book to find a new fill color. Squares: When the user selects a square the program needs to ask the user for a fill color. The choices are red, blue or yellow. These colors will determine the pen color. Pick a different color from Appendix D. For help with the location of your turtle, check out the section of your book in chapter 2 titled Moving the Turtle to a Specific Location. Also you will want to clear your screen and pause the execution of your code to give a little time between drawing the circle, square and triangle to drawing your new diagrams. To do that import the time library and clear your screen. Here is the code: import time #typed in at the top time. sleep (3) turtle.reset() turtle.setup (600, 600) #sets up the size of the window Additionally, since you have code from the first part of the assignment that works, comment that out while writing the new code. This will save time running and testing your code. Below are a few screen shots displaying what your output should look like. Keep in mind your colors will be different

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

What is a relevant cost? (p. 284)

Answered: 1 week ago

Question

=+ (a) Show that C is uncountable but trifling.

Answered: 1 week ago

Question

7. Define cultural space.

Answered: 1 week ago

Question

8. Describe how cultural spaces are formed.

Answered: 1 week ago