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

Mindmap

Programming Code Patterns

Gabriel Gozo Computing GCSE Englisch

Inhalt der Mindmap

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

Informationen

Beschreibung
GCSE Computing Mindmap am Programming Code Patterns, erstellt von Gabriel Gozo am 27/10/2020.
Erstellt von
Gabriel Gozo · Okt 2020
Aktualisiert
27 Okt 2020
Aufrufe
1
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck