O GoConqr está de visual novo! Conte para nós o que você achou.

Flashcards

Programming Constructs

Ariana Parr Computer Science A level Inglês 14 flashcards

Flashcards do 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

Informações

Descrição
A level Computer Science (Unit 2 - Topic 2) FlashCards sobre Programming Constructs, criado por Ariana Parr em 17-02-2022.
Criado por
Ariana Parr
Visualizações
0
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?