Open Tay Learning

Programming Constructs

As you worked through the first few lessons in this course you have come across several different constructs.

A Construct is just a fancy way of talking about a particular line or block of code.

This lesson will remind you of the different constructs we have looked at so far.

Input Constructs

This is any bit of code that you use to take in instructions or information.

This can be typed, tapped, clicked etc.

It is how users tell their devices what they want them to do.

Examples of this in Scratch would be:

 

Output Constructs

This is how our programs and devices show or tell us that they have done something.

It is a way of feeding back to the user.

It could be that something moves or appears on the screen, opens, flashes, or makes a noise.

Examples of this in Scratch would be:

  • Selection Constructs
  • This is how programs make decisions about which instructions or code to carry out.
  • They are used in almost every program and rely on user input or a condition to tell them what to do next.
  • They can be simple; where there is only one condition to be met, or complex; where there are two or more conditions to be met.
  • Examples in Scratch would be:

 

  • Fixed Loop Constructs
  • This is where code can be repeated a particular number of times.
  • Loops are used regularly in programs where blocks of code are needed in order to code more efficiently.
  • An example in Scratch would be:

 

Now answer the following quiz question...

Our Collaborators
Open Tay Learning CollaboratorsOpen Tay Learning Collaborators

© 2023 Tayside Regional Improvement Collaborative

Website by Internet Creation Ltd

Skip to content