Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Read the instructions carefully. Not following the instructions will result in you not getting the credit you want for the assignment. Learning Outcomes Add new
Read the instructions carefully. Not following the instructions will result in you not getting the credit you want for the assignment.
Learning Outcomes
Add new features to code you already made
New functions that you create call functions you previously made
Avoid writing code with global variables and global code
Take program input from the command line terminal, not keyboard
Structure
Files:
doodle.py
Problem
This project builds on your work from Timmy the Turtle. You will be enhancing it to introduce more complexity into the shapes drawn by the turtle.
The project involves:
Drawing Complex Shapes: You will compose complex shapes using the basic shapes you have already been drawing. For example, a house can be drawn using squares and triangles. Such a house function would call the square and triangle functions you already made.
Scaling Factors: You will use scaling factors to draw shapes of different sizes. This allows you to create a small house or a large house using the same code. You can scale values in two ways: you can scale the values that get passed to a function that draws some shape, or you can pass a scaling parameter to the function and scale the code inside the function. You choose.
Input: Your program should take one integer commandline parameter in range that changes some aspect of the drawing for each different value.
Remember, you may use any code provided in your book. Also, dont hesitate to ask for clarification if youre unsure about some resource.
Key Program Requirements and Grading
While you might observe that certain rubrics are being automatically graded, please note that these scores will not be transferred to Canvas until your instructor or TA comprehensively reviews the entire project and manually assigns grades after the deadline ends.
Automaticallygraded scoring points
Picture: Your code generates an image when we test it
Functions: If we count basic shape functions main function functions for different complex shapes then your program should have at least functions. You could have more, but you should not have less.
Main function: your toplevel code is in the main function.
No global variables: all variables are defined inside main or another function. No global variables.
Manually graded scoring points
Complex Shapes: Your drawing includes several complex shapes of different sizes and colors.
Scaling: Use a scaling factor to make drawing different sizes easier.
Input: The program takes one command line parameter, which alters the scene in some way
Snake Case All variable names and the code follows Python snake case or camelcase.
Use the following snippet of code to implement conditional execution of main. Dont make any calls that keep the turtle window open in main Instead call turtle.done after main as given here:
if namemain:
main
turtle.done
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