Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If you look around the web, you can find examples of many projects that draw pictures, scenes, landscapes, geometric patterns, or interesting doodles using Python

If you look around the web, you can find examples of many projects that draw pictures, scenes, landscapes, geometric patterns, or interesting doodles using Python turtles. For this project you will draw a picture, scene, landscape or doodle that has identifiable patterns. The things that appear in your doodle must be built by combining 3 different atomic shapes or patterns and using repetition. Atomic means its a building block that you dont break down into anything else. Use your imagination, but if you struggle too much, simplify your goals. Some examples of common geometric shapes, which might give you ideas can be found here.
User inputs for this project should be the turtle windows width and height values from the console. They should be positive integers only and should be validated. These values should then be used to set the size of the window. You must document in your module docstring what the window size should be.
Key ideas in this project are HOW you organize your code. Use parameterized functions as building blocks and loops wherever there is repeated code with variations.
project.
Logistics
Starter Code
You are given the starter code in the file doodles.py. You must use this file. Add code and comments in the places indicated. Do not change the other parts that have been given, and do not worry if you dont fully understand all of the code now, because you will later. Youll notice that there are test cases for the code that has been given. By intent, if you do mess up certain parts of the code, your program wont pass those cases.
Rubric
In the cases below, shape refers to any shape or pattern.
Automatic Tests (29 points)
(9 points) If user enters anything other than positive integers for window width and height, print Width and height must be positive integers. and exit.
(9 points) Code has a main function with conditional execution.
(5 points) Code uses snake case for variable names.
(6 points) The style checker (pylint with a custom configuration) emits no warnings.
Manual Tests (51 points)
(9 points) The scene includes at least 3 different shapes, each encapsulated by a function with parameters.
(9 points) Atomic shapes appear with different fill colors and border colors in different locations.
(9 points) Atomic shapes appear tilted or rotated.
(9 points) Atomic shapes appear in different sizes.
(9 points) Loops are used to reduce any repeated code.
(6 points) Your file has a module docstring with required information in it.
The starter code that can't have anything deleted in question:
Put your description here, lessons learned here, and any other information
someone using your program would need to know to make it run.
'''
# (3) add functions here that your main program calls
# to do stuff.
def main():
'''
Program starts here.
'''
try:
# (1) replace pass with your code
pass
except ValueError:
print('Width and height must be positive integers.')
return
if width <1 or height <1:
print('Width and height must be positive integers.')
return
# (2) replace pass with your code
pass
if __name__=="__main__":
main()
I would like the full code solution that fits the criteria and uses the starter code (nothing deleted). I have code but I want a second opinion.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions