Computer Programming I
|
Practice Python Test
Patterns with ShapesWe are going use the shapes we made to create some patterns using for loops and random colors.
1. First make a file called patterns.py and copy the code on this page to make patterns using a circle. Then add functions to your patterns.py file that make similar patterns using all the shape functions you defined. 2. Make the following functions that draw patterns: CirclePattern Triangle Pattern Square Pattern Hexagon Pattern etc. Shapes with TurtleImport the turtle program and write a function to draw each of the following shapes using the included turtle functions
3. Triangle 4. Square 5. Pentagon 6. Hexagon 7. Heptagon 8. Octagon 10. Decagon 12. Dodecagon Start with this in a file called shapes.py: ----shapes.py----------------------- import turtle turtle.color("blue","blue") turtle.pensize(5) def Triangle(): for i in range(3): turtle.forward(100) turtle.right(120) Triangle() ------end shapes.py------------------- Turtle functions (or commands) forward() backward() right() left() goto() speed() color() pensize() clear() Learning Python the Hard WayThis quarter we are going to go over everything you should know about python using this book:
Learn Python the Hard Way Test on Object Oriented ProgrammingSuper Alveyworld Game (click Alvey to got to GIT Hub)Python Gaming
You have two tasks to complete to prepare for creating games in pythons
Click Here to Begin Learning Test. Have we learned anything?Challenge Task for Friday November 15th
|