• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/12

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

12 Cards in this Set

  • Front
  • Back

sequence

sequence means that each instruction is executed once in the order that it is given



selection (if else)

selection is used when the computer executed one of a number of instructions based on a condition.


you can use ELIF statements are useful if you have multiple criteria

iteration

iteration means repeating an instruction a set number of times or until a condition is met


FOR loops are used to repeat an instruction a set number of times


WHILE loops repeat an instruction until a condition is met.

Variable

store data for use later in your program. you put this in RAM


a variable is a named location in memory where the programmer can store data.



Data types

char - single character - A


integer - a whole number - 567


string - a sequence of characters - hello


Boolean - true or false - TRUE


Float - a decimal number - 567.89

converting between data types

in some languages you have to say what data type the variable will be when you first declare it


Python will just guess based on what you put in the variable so if you say X=5 it will assume X is an integer


explicitly convert the variable to the correct type


str(X) - string


int(X) - integer


float(X) - float

constants

constants are locations in memory where the programmer can store data


once a constant has a value it cant be change


const pi = 3.14



subroutines

block of code that performs a specific task



procedures

a procedure is a subroutine that does not return a value to the main block of code

functions

subroutine that does return a value to the main block of code


easy to spot because they contain the word return

string handling

MID("Hello world",2,6) llo w


LEGNTH("Hello") 5


LEFT("Hello",2) Hel


RIGHT("Hello",3) lo


LOCATE("Hello","o") 4

Assembly language

low level language this means it is more difficult to understand and code than high-level languages but it is closer to machine code (binary)


Assembly language includes mnemonics (two or three letter acronyms eg ADD) as names for data stores and instructions.