Using python to write a pragram

profileqyfbdba123

a program that does something interesting using turtle graphics that makes use of at least 3 of the following:

% (the remainder operator)

math.sin

math.cos

math.exp

math.log

ord

chr

int

 / 

// (integer division)

Put comments in your program that describe how you used whatever functions or operators that you chose.

Remember that you can change the color with turtle.color((r,g,b)), where r, g, and b are floats between zero and one.  You can also change the thickness of lines with turtle.pensize(width).  

You may use the flower.py program that we worked on in class as a starting point, or you can do something completely different.  Be creative and try to make it interesting.  I don't want to see you just replace constant values with a function call (For example, if you have x += 1 and you change that to x += math.cos(0) or x += 4/(2**), I won't like it.  Those are just constants.  The function should depend on a variable which changes (like the loop counter in the flower program), or perhaps user input.

    • 10 years ago
    • 20
    Answer(0)