Page 32 - Knowledge Organiser Yr8 24-25
P. 32

                                 Knowledge Base: Computing Intro to Python and Draw Year 8 | Term 3
  1. Key Words
    1.1
  Algorithm
 An algorithm is set of instructions or rules that need to be followed in order to perform calculations or to solve a problem.
 1.2
  syntax error
  A syntax error is a mistake in your Python program that prevents it from running (executing). Syntax errors are like spelling and grammar errors.
 1.3
  variable
  A variable is a name given to an item of data so that the data can be stored in memory while your Python program is running.
 1.4
  input
  Values which get sent from the user into the computer.
 1.5
  program
  Code complied together to perform a specific function.
 1.6
   output
   The values which get sent from the computer to the user.
    3. Data Types
3.1 String
3.2 integer
3.3 float
3.4 boolean
4. Selection
4.1 selection
4.2 if
4.3 elif
4.4 else
4.5 ==
A Variable data type that can store a combination of letters, characters and numbers. A Variable data type that can store whole numbers.
A Variable data type that can store decimal numbers.
A Variable data type that stores either TRUE or FALSE.
Is used to allow the program to make a choice and take a different path.
Checks if the condition is true, if so the program runs the indented code below it. If the first if fails then this elif condition is checked, there can be multiple of these. If all if and elif statements are not true the code indented below else will run. Double equal sign is used to see if the contents of the variables match.
                        4.6
   :
   The colon ends the IF statement line and the indention of code underneath.
These are vital, so remember the colon and indention when you write IF statements.
 1.7 Data type
The type of data being used by the program
    5. Iteration
    5.1
   iteration
  Is used to repeat a set of instructions or commands in a program. It saves having to write them all out over and over again.
    2. Variables
    2.1
  Variables are simply a place on the computer’s memory that is given a name in order for it to remember it.
In Python you create a variable by writing the name of the variable followed by an =
 5.2 while
5.3 for
Checks if a condition is true and while it is true will keep repeating it.
Runs for a specific amount of times and stops when it reaches the desired number.
     32












































   30   31   32   33   34