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

Mapa mental

2.2 Programming

Khang Duong Inglês

Conteúdo do mapa

2.2 Programming

  1. Variables

    • Should not start with a number or contain spaces
    • Is a specific data type
  2. Key words

    • Whole number
      • no decimals/fractions
    • Real number
      • has a fractional part
    • Boolean
      • Trueorfalse
    • String
      • any text that isn't meant to be calculated
  3. Operators

    • Operators represent the operations that are performed on the data.
    • operators in Maths, e.g. +, -, /, *, ^, etc.
      • Numbers: addition, subtraction, division, modular division (division with a remainder), integer division, multiplication, to-the-power-of, negation
    • Boolean: AND, OR, NOT, larger, smaller, equal, not equal
    • Strings/characters: slicing, length, format
    • Addition total = amount + VAT Subtraction e.g. age = cur_year – y_birth Division divide = 5 / 2 Modular division myRemainder = 5 MOD 2 (find a remainder) Integer division intDivision = 5 DVI 2 Multiplication totalCost = cost * 0.2 Exponential area = 3.1 * radius^2
  4. Sequencing

    • Sequencing allows a programmer to solve complex tasks through a number of simple steps.
    • BENEFITS
      • Each line follows the next Create simple programs very quickly Easy to follow for a small program Fundamental principal of a program - Starts at the top, finishes at the bottom
    • NEGATIVES
      • Not at all efficient Becomes very difficult to follow with large programs Extremely hard to maintain
  5. SELECTION

    • Selection changes the flow of a program, depending on a set of conditions, it is used for validation, calculation and making sense of a user’s choices.
      • The use of selection allows a computer to “think” – make decisions
      • Apart from efficiency in reducing the number of lines of code we would run, we need programs to make decisions based on a set of criteria or condition. If the condition is true, we run this set of lines of code, if the condition is false – we run some other set of lines.
  6. ITERATION

    • The two common types of iteration: WHILE (condition-controlled) and FOR COUNTER (counter-controlled)
      • loops are called “iteration” because they run through or “iterate” through multiple similar items of data.
      • FOR COUNTER
        • This is the loop for when we know in advance how many times we want to loop back to the start, so we keep count and check against the number of repetitions (iterations) that are required, using a counter.
          • we use counters as virtual beads to know when to stop.
      • WHILE
        • Sometimes, we don’t know in advance how many times we want to repeat something, so we use “conditional” or “condition-controlled” loops. These loops evaluate a Boolean condition every time they run (either in the beginning or the end of an iteration) and if it is true – they carry on, otherwise, the loop stops.
          • These loops are better for user interfaces, or in general to allow interaction of the program with the outside world.

Informações

Descrição
Mapa Mental sobre 2.2 Programming, criado por Khang Duong em 18-01-2019.
Criado por
Khang Duong
Visualizações
1
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?