DIGITAL TECHNOLOGIES - NZ CURRICULUM
  • Home
    • Implementation
    • Digital Apps & Devices >
      • Digital Devices
    • NCEA Resources
    • Definitions >
      • Programming definitions
    • Curriculum
    • Blog
  • Why?
  • Progress Outcomes
  • Computational Thinking
    • Algorithms
    • Data Representation >
      • Binary Number Videos
      • Flowcharts >
        • Choose Your Own Adventure
  • D.D.D.O.
    • Create with Coding & Robots
    • Design Thinking
    • Maker Spaces
  • Authentic Contexts
    • Authentic Maths Contexts
    • Storybooks
  • Humans & Computers
    • Assistive Technologies
    • AR and VR
    • Ethical Issues >
      • 3 Laws of Robotics
      • A.I.
  • Programming
    • Micro Controllers & Computers >
      • Arduino
      • Makey Makey
      • Micro::bit >
        • Micro:bit and Scratch
        • Edtech Summit 2019
      • Raspberry Pi
    • Coding Apps & Sites >
      • Scratch
      • Scratch Jr
    • Creating Apps
    • Unplugged CT >
      • Unplugged Activities
    • HTML/CSS
    • Robots & Drones >
      • Edison
      • Beebots, Bluebots & Probots
    • Wearables

Programming - Definitions

Some elements of programming include:
  • Comparative operators: In a comparative relationship, you use one or more of the following operators to compare match field values (a field in a source table and a field in a related table that contain values you want to use to find matching records) in the two related tables:  =, ≠, <, >. ≤, ≥ or x.
  • Control structures: A control structure is a block of programming that analyses variables and chooses a direction to go based on given parameters. There are tree types of control structure: sequential - proceed to the next instruction; selection - choose between alternative paths, used for decisions, branching etc. and repetition - used for loops.
  • Iteration*: The repeating part of an algorithm with a loop. When the first set of instructions is repeated, it is called an iteration.
  • Logical operators: Two or more relations can be joined using the logical operators AND and OR.  For AND both relations must be true for the expression to be true. For OR If either relation is true, the  expression is true.
  • Loop: A sequence of instructions is continually repeated until a certain condition is reached e.g. when the counter reaches a prescribed number or when a dice rolls a particular number.  An infinite loop continues indefinitely.
  • Modular structure: the process of subdividing a computer program into separate sub-programs.
  • Selection*​: Choosing which part of an algorithm to execute based on some values. A question is asked, and depending on the answer, the program takes one of two courses of action, after which it moves on to the next event.
  • Sequencing*: Putting instructions one after another. An action, or event, leads to the next ordered action in a predetermined order.
  • Variables: A value that can change, depending on conditions or on information passed to the program. 
* One of the three basic logic structures in programming.
​​
Picture

​​L​oops can be infinite. In  this Scratch example the program will continue to loop until exited.

Picture
Picture
​The Scratch Jnr program on the left shows a sequence of commands (the input) including a loop where the commands: 'move 100 steps then turn 60 degrees' are repeated six times. Each move after the first 100 steps and 60 degree turn is an iteration.
At the end of each 100 steps and 60 degree turn the program will ask itself if 6 repeats have been completed and make a selection of either stopping if the answer is yes or repeating the action if the answer is no.
​On the right the output of that program are shown.
Below is similar code using  Tynker instead of Scratch Jnr.  Underneath those is the code using Javascript.
Picture
Picture
Picture
Sequencing, Selection & Iteration
Powered by Create your own unique website with customizable templates.
  • Home
    • Implementation
    • Digital Apps & Devices >
      • Digital Devices
    • NCEA Resources
    • Definitions >
      • Programming definitions
    • Curriculum
    • Blog
  • Why?
  • Progress Outcomes
  • Computational Thinking
    • Algorithms
    • Data Representation >
      • Binary Number Videos
      • Flowcharts >
        • Choose Your Own Adventure
  • D.D.D.O.
    • Create with Coding & Robots
    • Design Thinking
    • Maker Spaces
  • Authentic Contexts
    • Authentic Maths Contexts
    • Storybooks
  • Humans & Computers
    • Assistive Technologies
    • AR and VR
    • Ethical Issues >
      • 3 Laws of Robotics
      • A.I.
  • Programming
    • Micro Controllers & Computers >
      • Arduino
      • Makey Makey
      • Micro::bit >
        • Micro:bit and Scratch
        • Edtech Summit 2019
      • Raspberry Pi
    • Coding Apps & Sites >
      • Scratch
      • Scratch Jr
    • Creating Apps
    • Unplugged CT >
      • Unplugged Activities
    • HTML/CSS
    • Robots & Drones >
      • Edison
      • Beebots, Bluebots & Probots
    • Wearables