2.2 Programming Fundamentals

studied byStudied by 2 people
0.0(0)
Get a hint
Hint

Variable

1 / 21

22 Terms

1

Variable

A named container that stores a value in memory, which can change its value while the program is running.

New cards
2

Constant

A named container that stores a value in memory, which cannot change its value while the program is running.

New cards
3

Operators

Symbols used to perform operations on variables and values, such as +, -, *, /, MOD, DIV, ^, ==, !=, <, <=, >, >=.

New cards
4

Assignment

The process of assigning a value to a variable, e.g., favNum = 5.

New cards
5

Input

The method of receiving data from the user, e.g., favNum = input("Type in your number").

New cards
6

Output

The method of displaying data to the user, e.g., print("your favourite number is", favNum).

New cards
7

Integer

A whole number, such as 1, 5, or -259.

New cards
8

Real / Float

Numbers that can have a fractional part, such as 1.5 or -125.1.

New cards
9

Boolean

A data type that can be either TRUE or FALSE (1 or 0).

New cards
10

Sequence

A set of instructions executed in order, line by line.

New cards
11

Selection

Instructions that do not have to be executed in sequence, based on the results of an event or condition.

New cards
12

Iteration

The repetition of a block of statements within a program.

New cards
13

Count-controlled iteration

A type of iteration with a fixed number of repetitions, e.g., for i in range(5, 10, 3).

New cards
14

Nested count-controlled iteration

A loop within another loop, e.g., for i in range(5) followed by another for loop.

New cards
15

Condition-controlled iteration

An indefinite iteration that continues based on a condition, e.g., while(i < 10).

New cards
16

Character

A single alphanumeric symbol, such as 'a', 'c', or '1'.

New cards
17

String

One or more alphanumeric characters, e.g., "abcd", "123", "12/01", "ÂŁ3.50".

New cards
18

Casting

Changing how a variable’s data type is interpreted or a temporary conversion of data type.

New cards
19

Subroutines

A block of code executed whenever called, allowing code reuse and easier debugging.

New cards
20

Functions

A subroutine that returns a value.

New cards
21

Procedures

A subroutine that does not return a value.

New cards
22

Arrays

A collection of items stored at contiguous memory locations, e.g., favFoods = ["Chicken", "Fish and Chips"].

New cards

Explore top notes

note Note
studied byStudied by 38999 people
... ago
4.9(89)
note Note
studied byStudied by 13 people
... ago
5.0(1)
note Note
studied byStudied by 3 people
... ago
5.0(1)
note Note
studied byStudied by 34 people
... ago
4.0(1)
note Note
studied byStudied by 5 people
... ago
5.0(1)
note Note
studied byStudied by 19 people
... ago
5.0(1)
note Note
studied byStudied by 8 people
... ago
5.0(1)
note Note
studied byStudied by 12 people
... ago
5.0(1)

Explore top flashcards

flashcards Flashcard (108)
studied byStudied by 13 people
... ago
5.0(1)
flashcards Flashcard (50)
studied byStudied by 52 people
... ago
5.0(2)
flashcards Flashcard (24)
studied byStudied by 2 people
... ago
5.0(1)
flashcards Flashcard (35)
studied byStudied by 168 people
... ago
5.0(1)
flashcards Flashcard (39)
studied byStudied by 17 people
... ago
5.0(1)
flashcards Flashcard (44)
studied byStudied by 39 people
... ago
5.0(1)
flashcards Flashcard (50)
studied byStudied by 15 people
... ago
5.0(2)
flashcards Flashcard (72)
studied byStudied by 23 people
... ago
5.0(1)
robot