Program Flow 1

  • Created by: Tomiwaq
  • Created on: 03-05-19 10:20
View mindmap
  • Program flow
    • IF statements
      • IF statements allow you to check if a condition is true or false
      • If there is nothing for the program to do when the condition is false, leave the 'else' part
    • Nested IF statements
      • Allows you to check more conditions to see if the previous condition is true
      • IF-ELSEIF statements can also be used to check multiple conditions
      • IF-ELSEIF are different because they only check more conditions if it was false before
    • SWITCH-CASE statements
      • Check if a variable has specific values
      • They are used if a program has different actions for different values of the same variable
      • They are similar to IF-ELSEIF but have a neater way to test different values
      • They only check the value of one variable.
    • FOR loops
      • Will repeat the code inside them a fixed number of times
      • The number of times the loop repeats can also be set as the program runs
      • FOR loops can also use the count within the loop

Comments

No comments have yet been made

Similar Computing resources:

See all Computing resources »See all Programming resources »