Python Creating a random shape - Can You Compute?
Python ? Creating a random shape
Task 31
The program below defines a procedure called shape(), then runs it once: import turtle def shape(): for i in range(4): turtle.forward(50) turtle.right(90) shape()
How would this change if you wanted to create a 3 sided shape?
How would this change if you wanted to create a 5 sided shape?
What is the connection between the number of sides and the angle the turtle needs to turn through?
What else do you need to add in if this program is going to create a random shape of between 3 and 6 sides?
a) Create the program above and check it works (Task31a) b) Edit it so that it creates a random shape of between 3 and 6 sides (Task31b) c) Edit it so that it now has a random fill and/or line colour ? reuse a function
from a previous lesson (Task31c)
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- fem example in python university of pittsburgh
- python creating a random shape can you compute
- reading and writing vector data with ogr utah state university
- introduction to python harvard university
- shape analysis measurement purdue university
- a python toolbox for shape detection and analysis in images
- pyqgis developer cookbook
- metashape python reference
- imea a python package for extracting 2d and 3d shape measurements from
- introduction to alpha shapes stanford university
Related searches
- how fast can you get a loan
- where can you get a personal loan
- can you buy a car with cash
- how many words can you make out of a word
- can you get a law degree online
- can you finance a used car
- can you turn in a lease early
- can you cosign a mortgage
- can you buy a house in cash
- what can you do on a tablet
- can you start a sentence with and
- can you return a leased car early