GoConqr has a new look! Let us know what you think.

Flashcards

PROGRAMMING

Ruby Johnson English 17 cards

Cards in this deck (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)

Information

Description
Flashcards on PROGRAMMING, created by Ruby Johnson on 24/05/2021.
Created by
Ruby Johnson
Views
4
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?