2.2 Programming V1

Description

GCSE Computing (2.2 Programming) Mind Map on 2.2 Programming V1, created by 2402 2003 on 22/01/2019.
2402 2003
Mind Map by 2402 2003, updated more than 1 year ago
2402 2003
Created by 2402 2003 about 5 years ago
37
0

Resource summary

2.2 Programming V1
  1. Variables: Inputs, Outputs and Assignments
    1. Variable - Changes throughout the program
      1. Constant - Fixed for the duration of the program
        1. Normally in CAPITAL letters
          1. In capitals to simplify debugging and are less likely to generate mistakes as they don'tchange during runtime
        2. RAM is divided in memory locations with long hexadecimal (but really binary) addresses
          1. A grid of memory locations (or cells) can hold values
            1. Inputs
              1. Programs would be useless without inputs as they can't interact with the outside world and always produce the same results
            2. Selection
              1. Allows a computer to "think" - make decisions
                1. 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
                  1. Nested Selection
                    1. Sometimes, we can only evaluate a condition if some pre-condition is met. We would need two selection statements, one inside the other
                      1. The "outside" selection is the pre-condition, while the "inside" selection is the conditon
                        1. There is no limit on how many selection statements we can nest
                      2. Iteration
                        1. For Counter (Counter-controlled)
                          1. The loop for when we know in advance how many times we want to loop back to the start, so we keep count against the number of repetitions that are required using a counter
                          2. While Loop (Condition-controlled)
                            1. Loops until the condition is met/changes
                              1. Better for user interfaces
                              2. Repetition of a process
                              3. Operators
                                1. Represents the operations that are performed on the data
                                  1. Arithmetic Operators
                                    1. + - Addition
                                      1. - - Subtraction
                                        1. * - Multiplication
                                          1. / - Division
                                            1. MOD - Modulus (Remainder) e.g.12 MOD 5 = 2
                                              1. DIV - Ouotient e.g. 17 DIV 5 = 3
                                                1. ^ - Exponentiation (To the power of)
                                                2. Comparison Operators
                                                  1. == - Equal to
                                                    1. != - Not equal to
                                                      1. < - Less than
                                                        1. > - Greater than
                                                          1. <= - Less than or equal to
                                                            1. >= - Greater than or equal to
                                                            2. Logical Operators (Only used in Booleans)
                                                              1. AND - Two conditions must be met for the statement to be true
                                                                1. OR - At least one condition must be met for the statement to be true
                                                                  1. NOT - Inverts the results e.g. NOT(A and B) will only be false when both A and B are true
                                                                  2. String Operators
                                                                    1. .upper - UPPERCASE
                                                                      1. .lower - lowercase
                                                                        1. .length - Number of characters in a string (including spaces)
                                                                          1. .substring (x,y) - Part of a string
                                                                        2. Sequencing
                                                                          1. Allows a programmer to solve complex tasks through a number of simple steps
                                                                            1. Benefits
                                                                              1. Each line follows the next
                                                                                1. Create simple programs very quickly
                                                                                  1. Easy to follow for a small program
                                                                                    1. Fundamental prinicipal of a prgram
                                                                                      1. Starts at the top, finishes at the bottom
                                                                                    2. Disadvantages
                                                                                      1. Not at all efficient
                                                                                        1. Becomes very difficult to follow with large problems
                                                                                          1. Extremely hard to maintain
                                                                                        2. SQL (Standard Query Language)
                                                                                          1. Progranmming languague used to work with databases
                                                                                            1. Can be run from a special window in a database package
                                                                                              1. SELECT - SQL Keyword
                                                                                                1. Accomplishes searching and reading simultaneously, separates keywords from names and criteria
                                                                                                  1. Nested SELECT
                                                                                                    1. Multi-stage filtering e.g. finding all pupils in a set with the first select and then just retrieve those who get over 80 in results
                                                                                                      1. Particularly useful in multi-table databases
                                                                                                  2. Arrays
                                                                                                    1. An ordered collection of related data where each element is accessible by a number, known as an index
                                                                                                      1. Advantages
                                                                                                        1. Good for ease of iterating through an array - allows us to manipulate multiple times of data with very few lines of code,replacing may separate variables
                                                                                                          1. Non-sequential nature - can jump between non-neighbouring elements instantly without having to browse through the whole array
                                                                                                        2. Usually have fixed sizes and occupy a fixed (static) amount of memory
                                                                                                          1. Begins with 0
                                                                                                          2. Sub Programs
                                                                                                            1. Can be used to save time and simplify the code. Main types of sub programs are procedures and functions
                                                                                                              1. When you want your program to repeat in different places, you only need to call the name of the subprogram, saving time & simplifying the code by avoiding repetition of code
                                                                                                                1. Procedures are sets of instructions stored under one name (identifier) e.g. Prodecure name () -> 'Coding' -> End Prodecure
                                                                                                                  1. Functions are similar to procedures but always return a value to the main program
                                                                                                                  Show full summary Hide full summary

                                                                                                                  Similar

                                                                                                                  A level Computing Quiz
                                                                                                                  Zacchaeus Snape
                                                                                                                  Types and Components of Computer Systems
                                                                                                                  Jess Peason
                                                                                                                  Input Devices
                                                                                                                  Jess Peason
                                                                                                                  Output Devices
                                                                                                                  Jess Peason
                                                                                                                  Computing
                                                                                                                  Kwame Oteng-Adusei
                                                                                                                  Pack of playing cards answer
                                                                                                                  Karl Taylor
                                                                                                                  Code Challenge Flow Chart
                                                                                                                  Charlotte Hilton
                                                                                                                  Computing Hardware - CPU and Memory
                                                                                                                  ollietablet123
                                                                                                                  Computer Systems
                                                                                                                  lisawinkler10
                                                                                                                  Computer science quiz
                                                                                                                  Ryan Barton
                                                                                                                  Input, output and storage devices
                                                                                                                  Mr A Esch