GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

PROGRAMMING

Ruby Johnson Englisch 17 Karten

Karten in diesem Stapel (17)

  1. 1import turtleImports the turtle library, to make turtle functions available
  2. 2wn = turtle.Screen()Creates a window to draw in
  3. 3daisy = turtle.turtle()Creates a turtle named daisy
  4. 4daisy.forward/left/right(90)moves daisy forward/left/right 90 pixels
  5. 5pythonprogramming language
    Instructions are written using Python, which the computer then executes
  6. 6problem solvingThe main skill that programming requires is problem solving
  7. 7programmingproviding instructions to a computer to solve a problem
  8. 8penup()tells the turtle to stop drawing, so it can be moved about without leaving a line
  9. 9pendown()tells the turtle to start drawing, so lines can be created
  10. 10pencolor()used to change the colour of the line that is drawn by the turtle
  11. 11fillcolor()fill the colour of shape you are creating
  12. 12begin_fill() / end_fill()begging or stopping to fill the shape
  13. 13loop example: for x in range (5):make the code repeat, rather than typing it out multiple times
  14. 14drawPentagon() (CAN BE ANY SHAPE)code for drawing any shape without having to type out so many procedures
  15. 15goto() example : (20,-20)to draw the shape you would like several times
  16. 16size/sidesWhen we use the function, we can tell it what number to use for sides, and what number to use for size
  17. 17example of what end result should look like:import turtle
    sc = turtle.Screen()
    kevin = turtle.Turtle()
    def drawShape(sides,size):
    for x in range (sides)
    kevin.forward(size)
    kevin.left(360/sides)

Informationen

Beschreibung
Karteikarten am PROGRAMMING, erstellt von Ruby Johnson am 24/05/2021.
Erstellt von
Ruby Johnson
Aufrufe
4
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck