Answered step by step
Verified Expert Solution
Link Copied!

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:
1
)
you can scale the values that get passed to a function that draws some shape, or
2
)
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 command
-
line parameter in range
{
1
,
2
,
3
}
that changes some aspect of the drawing for each different value.
Remember, you may use any code provided in your book. Also, don
t hesitate to ask for clarification if you
re 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.
Automatically
-
graded scoring
(
4
5
points
)
(
2
0
)
Picture: Your code generates an image when we test it
.
(
1
5
)
Functions: If we count
3
basic shape functions
+
1
main function
+
2
functions for
2
different complex shapes then your program should have at least
6
functions. You could have more, but you should not have less.
(
5
)
Main function: your top
-
level code is in the main function.
(
5
)
No global variables: all variables are defined inside main or another function. No global variables.
Manually graded scoring
(
5
5
points
)
(
2
0
)
Complex Shapes: Your drawing includes several complex shapes of different sizes and colors.
(
2
0
)
Scaling: Use a scaling factor to make drawing different sizes easier.
(
1
0
)
Input: The program takes one command line parameter, which alters the scene in some way
(
5
)
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. Don
t make any calls that keep the turtle window open in main
(
)
.
Instead call turtle.done
(
)
after main
(
)
as given here:
if
_
_
name
_
_
=
=
"
_
_
main
_
_
"
:
main
(
)
turtle.done
(
)Criteria Description Points
Complex Shapes Your drawing includes several complex shapes of different sizes and colors. 20
Scaling Use a scaling factor to make drawing different sizes easier. 20
Input The program takes one command line parameter, which alters the scene in some way. 10
Pictures You code generates an image when we test it.20
Function Count If we count 3 basic shape functions +1 main functions +2 functions for 2 different complex shapes, then your program should have at least 6 functions. You could have more, but you should not have less. 15
Snake Case All variable names and the code follows Python snake case or camelcase. 5
Global Code *All* variables are defined inside main or another function. No global variables. 5
Main Function Your top-level code is in the main function. The program contains a main function with conditional execution. 5

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

Power Bi And Azure Integrating Cloud Analytics For Scalable Solutions

Authors: Kiet Huynh

1st Edition

B0CMHKB85L, 979-8868959943

More Books

Students also viewed these Databases questions

Question

=+ Are these impediments deliberate?

Answered: 1 week ago