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

Karteikarten

Ohne Titel

Charlotte Chandler Englisch 16 Karten

Karten in diesem Stapel (16)

  1. 1ProgrammingProgramming is simply providing instructions to a computer to solve a problem
  2. 2Problem SolvingThe main skill that programming requires is problem solving
    Often we don’t know how to solve the problem, but we know how to make a start – getting things wrong then trying something different is a big part of it
  3. 3PythonPython is a programming language
    Instructions are written using Python, which the computer then executes
    Python is one of the most widely used programming language and is supported on nearly every device
  4. 4ProgrammingProgramming is simply providing instructions to a computer to solve a problem
  5. 5Problem SolvingThe main skill that programming requires is problem solving
    Often we don’t know how to solve the problem, but we know how to make a start – getting things wrong then trying something different is a big part of it.
  6. 6PythonPython is a programming language
    Instructions are written using Python, which the computer then executes
  7. 7penup()tells the turtle to stop drawing, so it can be moved about without leaving a line
  8. 8pendown()tells the turtle to start drawing, so lines can be created
  9. 9pencolor()can be used to change the colour of the line that is drawn by the turtle
  10. 10fillcolor("colour") begin_fill() end_fill()The fill colour is set with fillcolor()
    Only shapes drawn between begin_fill() and end_fill() will be coloured in
  11. 11Pattern RecognitionOne of the principals of computational thinking is pattern recognition.
    If we can spot a repeating pattern in our code, there is usually a way to make it more efficient
  12. 12LoopsWhen we spot a repeating pattern, we can use a loop to make the code repeat, rather than typing it out multiple times
    To loop code n times, we use the code,
    for x in range(n):
  13. 13ProcedureWe can define a procedure using the def command
    We can define a procedure anywhere in the code, as long as it’s defined before it’s used
    The code shown defines a procedure called “drawPentagon()”, which is used later in the program
  14. 14basic codeimport turtle
    sc = turtle.Screen()
    kevin = turtle.Turtle()
    kevin.right(144)
    kevin.forward(200)
    kevin.right(144)
    kevin.forward(200)
  15. 15loop codeimport turtle
    sc = turtle.Screen()
    kevin = turtle.Turtle()
    for x in range(2) :
    kevin.right(144)
    kevin.forward(200)
  16. 16procedure codedrawpentagon()
    kevin.penup()
    kevin.goto(20,20)
    kevin.pendown()
    drawpentagon()
    kevin.penup()
    kevin.goto(20,-20)
    kevin.pendown()

Informationen

Beschreibung
Karteikarten am Ohne Titel, erstellt von Charlotte Chandler am 24/05/2021.
Erstellt von
Charlotte Chandler
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck