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

Mind map

Programming Code Patterns

Gabriel Gozo Computing GCSE English

Map content

Programming Code Patterns

  1. Counter Controlled Loops

    • Loops which will run a predictable number of times
      • e.g. while x < 5:
    • Counter
      • Tracks no. of times loop will run
  2. Conditional Loops

    • A while loop that will continue while or until a condition is met
      • Can be associated with validation
        • while loops can be used for the following checks:
          • presence check
          • full number range check
          • range check
    • For loops
      • For will determine the iteration's starting point
      • range(x) will determine the number of iterations
        • e.g. for x in range(5) will go from 0 to 4 because (0 1 2 3 4)
    • will run forever if a condition that causes the while loop to run never changes
  3. Iterating over a 1D array

    • 1D array iteration requires only 1 index e.g array[x]
    • Counter controlled loop
  4. Iterating over a 2D array (doing something with every value)

    • Updating values requires variable indexes
    • Counter controlled loop
      • Arrays cannot be infinitely large
    • e.g. grid[row][col] = variable
  5. Iterating over the columns of a 2D array

    • The columns of an array are linked to the first index
      • E.g. grid[1][0] would indicate the first column which is column 0
    • counter controlled loop
      • Incrementing variable
  6. Iterating over the rows of a 2D array

    • The rows of an array are linked to the second index
      • E.g. array[0][1] 0 would indicate row 0. 1 Indicates element 1 of row 0
      • Counter controlled loop
        • Incrementing variable
  7. Functions are very likely to contain some form of loop

    • Functions can embed these loops within themselves and can be called when needed
  8. Iteration is used all the time in programming code

  9. Code patterns are types of code that are frequently repeated in programming

Information

Description
GCSE Computing Mind Map on Programming Code Patterns, created by Gabriel Gozo on 27/10/2020.
Created by
Gabriel Gozo · Oct 2020
Updated
Oct 27, 2020
Views
1
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?