Activity Sheet 4a: Introduction to Python with turtles



Activity Sheet 4a: Introduction to Python with turtlesBefore you start download the starter program for this lesson from <your shared drive>Task 1: Answer these questionsIn right(90) what does the 90 mean? ______________________________________What does forward(100) do? ________________________________________________________________________________________________________________________________________What happens when you move endfill() to a place earlier in the code?___________________________________________________________What happens if you change all the right(90) lines to right(45)? Try it and see?________________________________________________________________________________________________________________________________________What commands do you think can be used to go back and left? ________________________________________________________________________________________________________________________________________What is the word def used for?________________________________________________________________________________________________________________________________________What happens if any of the lines inside the function are not indented? Try it and see?________________________________________________________________________________________________________________________________________Task 2: Make more shapesTry these exercises – see commands at the bottom of the sheetRename the function square() rather than mystery and change the colour of the linesthe fill colourthe length of the lines49383951663065Make a new function called triangle() – you will need to change the angle between the linesUse penup() and pendown() to draw a square and a triangle with a space between themUse the circle() function to draw two circles, one inside the otherDraw the shape on the rightExtension: Draw some fireworks in different colours!forward() or fdGo forwardcircleDraw a circlebackwardGo backwardresetClear the screenrightTurn rightsetpostion(x,y)Move to position x yleftTurn leftpensize()Set the width of the brush/penpenup()Lifts the pen up so you can move the turtle without drawingshape(“turtle”)Change shape to a turtlependown()Drops the pen back onto the screen so you can drawshape(“circle”)Change the shape to a circlefillcolor(“Brown”)Changes the fill colour to brown(or other colour)stamp()Leave an impression of the shape on the screenbegin_fill()Begins to fill the shapepencolor(“Red”)Changes the pen colour to red (or other colour)end_fill()End the filling sequencewrite()Write some text ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download