CCCS#12 Functions

This video is about Statements and Functions in programming

Move onto Algorithms 

Functions

Note that when Carrie-Anne describes if statements as conditional - of course she is right they do something or not based on a condition,  but we often refer to them as SELECTION statements - because a choice is made.  Part of SELECTION, ITERATION, SEQUENCE and ASSIGNMENT - the four constructs of programming. 

  1. What does the statement A = 5 do and what is this kind of statement called?
  2. What is a good practice when naming a variable and why?
  3. How does an IF – THEN  ELSE statement work?
  4. A While Loop is a conditional loop - how many times will it execute?  a) don't know b) at least once c) until the correct data is entered 
  5. The statement Relays = Relays + 1 has what effect on the variable identified as Relays?
  6. What happens to the counter or i variable in a counter controlled loop when next is reached?
  7. What is the difference between a  Counter controlled loop and  a Conditional loop?
  8. Why is it a good coding practice to use functions whenever possible?
  9. Is it possible to have a function within function?
  10. Why is idea of functions important in modern programming?
  11. What are Libraries?