¡GoConqr estrena diseño! Cuéntanos qué te parece.

Fichas

Programming Constructs

Ariana Parr Computer Science A level Inglés 14 fichas

Fichas del conjunto (14)

  1. 1What are the 3 main ways of controlling the order in which programmes run?- sequence
    - selection
    - iteration
  2. 2What is sequence?When statements or functions are executed one after another. They are executed once and in the order in which they are written
  3. 3What is selection/ branching?Where the flow of the program is interrupted and control is passed to another point in the program. This decision is based on a Boolean expression
  4. 4What are the main condition types for a selection statement- if else
    - if elif else
    - switch case
  5. 5show example of if, elif, elseif condition then....
    elif condition then....
    else....
    endif
  6. 6show an example of switch caseswitch variable:
    case 'parameter':.....
    case 'parameter'....
    default:......
    endswitch
  7. 7when should you use elif?When there are more than two conditions
  8. 8what is a nested if statement?when you have a selection statement within a selection statement
  9. 9What will switch case test?will test a single variable against different parameters. Therefore you do not need to write out multiple IF statements. They are easier and shorter to write
  10. 10What is iteration?Iteration takes place when one or more instructions are executed more than once/ are repeated. They use count controlled loops (FOR) and condition controlled loops (WHILE and DO)
  11. 11What are the two main types of iteration?-Count controlled (for)
    - condition controlled (while/do)
  12. 12When are for loops used?When you always want to execute the loop a fixed number of time, controlled by a variable
  13. 13When are while loops used?When you dont know how many times the loop will eb repeated or if the loop will even be needed at all. You use it when you want to execute the loop while a condition is met. A condition is checked BEFORE entry on the loop.
  14. 14When are do loops used?When you don't know how many times the loop will be repeated but you know it will run at least once. You use it when you want to execute the loop while a condition is met. A condition is checked at the end of the loop, therefore the loop will always run at least once

Información

Descripción
A level (Unit 2 - Topic 2) Computer Science Fichas sobre Programming Constructs, creado por Ariana Parr el 17/02/2022.
Creado por
Ariana Parr
Visitas
0
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?