Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Description for code (please use python) Starter code 1. Turtle Patterns I - Description Problem Expected Duration: 3-4 hours If you look around the web,

Description for code (please use python)

image text in transcribed

image text in transcribed

image text in transcribed

Starter code

image text in transcribed

image text in transcribed

1. Turtle Patterns I - Description Problem Expected Duration: 3-4 hours 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 it's a building block that you don't 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. 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. Do not copy code from anyone else, including internet sources, though you may look at code for ideas. You may use any code provided in your book. Here is one example of an approved resource for scene building. These resources give you ideas, some skeleton code, some test code, and a little bit of example code to use, but you have to do the real thinking and the developing work. As always, if you are unsure about some resource, you can ask the instructor for approval. The Python turtle graphics documentation can be found here. Keep in mind that you will revisit this code later for Project 4, but don't get hung up on that, and save any advanced features for Project 4-don't do them for this project. 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 other code, including the code in run_doodles.py. The autograder does not use run_doodles.py; it uses your code in the same way as run_doodles.py. If you don't fully understand all of the code now, you will later. You'll 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 won't pass those cases. Inputs User inputs for this project should be the turtle window's 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 specify the width and height for your drawing in dimensions.txt. For a drawing that is 300 pixels wide and 400 pixels tall, dimensions.txt should contain the following: Getting drawing dimensions The function should read a width and a height from standard input (the built-in function does this). If the values entered do not both encode positive integers, should raise a If they do both encode positive integers, should return a tuple containing the width and height (in that order) as integers. You do not need (and should not write) special code to read from dimensions.txt; this is taken care of for you. Helper functions Create functions that draw components of your doodle. At a minimum, you must create one function for each of three of your atomic shapes. Each of these functions should have parameters that allow you to change the following properties of each shape: - color - size - tilt (orientation) Your functions may have additional parameters if you like. Drawing the doodle The function should accept width and height (as integers), set the size of the window accordingly (you can get a object and call the method with a one-liner: , and draws your doodle using your helper functions. Other code Besides statements, all of your code in doodles.py should appear inside of functions. There are two different ways you might want to test your program. Regardless of the way you run your program, your code should read the dimensions using Use this button if you want to type dimensions in manually: Use this button if you want to use dimensions.txt to specify inputs: 123456789101112131415161718192021222324IProjectName:Author:DueDate:YYYY-MM-DDCourse:CS1400-zzzPutyourdescriptionhere,lessonslearnedhere,andanyotherinformationsomeoneusingyourprogramwouldneedtoknowtomakeitrun.1#(3)addfunctionsherethatyourmainprogramcalls#todostuff.defgetdimensions():#(1)replacepasswithyourcodepassdefdraw(width,height):Setsthesizeofthescreentowidthandheightanddrawsadoodle.111#(2)replacepasswithyourcodepass

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions

Question

What kind of salary are you offering for this position?

Answered: 1 week ago