programming fundamentals

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall with Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/27

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

28 Terms

1
New cards

what’s needed to create an algorithm

  • To create an algorithm, the inputs, processes and outputs must be identified

2
New cards

What is an input?

  • An input is data or information being entered/taken into a program before it is processed in the algorithm

  • An input can come from a variety of sources, such as:

    • User - keyboard, mouse, controller, microphone

    • Sensors - temperature, pressure, movement

3
New cards

what’s a process

  • A process is a doing action performed in the algorithm that transforms inputs into the desired output. The central processing unit (CPU) executes the instructions that define the process


4
New cards

examples of process

  • Comparing two numbers

  • Calculating an average

5
New cards

What is an output?

  • An output is the result of the processing in an algorithm and usually the way a user can see if an algorithm works as intended

6
New cards

what are some forms of an output?

  • An output can take various forms, such as:

    • Numbers - result of calculations

    • Text

    • Images

    • Actions - triggering events

7
New cards

what is a structure diagram?

  • A structure diagram is a visual representation of problem decomposition

  • A tool to show how a complex problem can be broken down into more manageable sub problems

  • A planning tool for developers during the analysis of a problem

8
New cards

9
New cards

symbol for start or end in a flowchart

10
New cards

input/output symbol

11
New cards

process symbol

12
New cards

decision symbol

13
New cards

what is a syntax error

  • A syntax error is an error that breaks the grammatical rules of a programming language and stops it from running

  • Examples of syntax errors are:

    • Typos and spelling errors 

    • Missing or extra brackets or quotes

    • Misplaced or missing semicolons

    • Invalid variable or function names

    • Incorrect use of operators

    • Incorrectly nested loops & blocks of code

14
New cards

What is a logic error?

  • A logic error is where the program runs/executes but produces an unexpected or undesired output

  • They do not perform what the programmer intended

  • Logic errors can be difficult to identify by the person who wrote the program, so one method of finding them is to use 'Trace Tables'

  • Examples of logic errors are:

    • Incorrect use of operators  (< and >)

    • Logical operator confusion (AND for OR)

    • Looping one extra time

15
New cards

what’s a variable

  • A variable is a named memory location that holds data that during the execution of a program, the data can change

  • Variables can store a variety of different types of data such as numbers, text or true/false values


16
New cards

What is a constant?

  • A constant is fixed data that during the execution of a program cannot change

  • A constant can store a variety of different types of data, similar to variables

17
New cards

what is assignment?

  • Assignment is the process of storing data in a variable or constant under a descriptive name


18
New cards

What is an operator?


  • An operator is a symbol used to instruct a computer to perform a specific operation on one or more values

  • Examples of common operators include:

    • Arithmetic

    • Comparison

    • Boolean (AND, OR and NOT)

19
New cards

What is an input?

  • An input is a value that is read from an input device and then processed by a computer program

  • Typical input devices include:

    • Keyboards - Typing text

    • Mice - Selecting item, clicking buttons

20
New cards

what’s an output

  • An output is a value sent to an output device from a computer program

  • Typical output devices include:

    • Monitor - Displaying text, images or graphics

    • Speaker - Playing audio

21
New cards

What is sequence?

  • Sequence refers to lines of code which are run one line at a time

  • The lines of code are run in the order that they written from the first line of code to the last line of code

  • Sequence is crucial to the flow of a program, any instructions out of sequence can lead to unexpected behaviour or errors

22
New cards

What is selection?

  • Selection is when the flow of a program is changed, depending on a set of conditions

  • The outcome of this condition will then determine which lines or block of code is run next

  • Selection is used for validation, calculation and making sense of a user's choices

  • EG. if... then... else... statements - this is when you test conditions sequentially 

23
New cards

What is iteration?

  • Iteration is repeating a line or a block of code using a loop

  • Iteration can be:

    • count controlled - this is when the code is repeated a fixed number of times (e.g. using a for loop)

24
New cards

what are the 4 datatypes

  • integer : whole number

  • float : unwhole number

  • string : letters

  • boolean : true/false

25
New cards

What is casting?

  • Casting is when you convert one data type to another data type


26
New cards

string manipulation ?

String manipulation is the use of programming techniques to modify analyse or extract information from a string

27
New cards

What is case conversion?

Case conversion is the ability to change a string from one case to another e.g. lowercase

28
New cards