Question: For your initial post, modify one of the two templates below to define and then call a function. Your function can be like the examples,

For your initial post, modify one of the two templates below to define and then call a function. Your function can be like the examples, or more complicated if you want the challenge. The focus is on keeping the template structure and using one or more parameters correctly.
Some ideas for a fruitful function are:
Perform another mathematical operation, like subtract 17, or multiply by 5.25
Add up all the odd numbers from 1 to some limit
Add up all the even numbers from 2 to some limit
Add up all numbers in some range (needs two parameters)
Some ideas for a non-fruitful function with a turtle are
Draw another regular polygon (pentagon, hexagon, octagon)
Draw a right triangle
Draw a filled circle that changes colors (see .dot() function)
Draw a target design with different colored bands
Be sure to change the comments to say what your function does and what the parameters are!!!!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!