2.2 Programming Fundamentals

studied byStudied by 0 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 9 people
... ago
5.0(1)
note Note
studied byStudied by 5 people
... ago
4.0(1)
note Note
studied byStudied by 90 people
... ago
5.0(1)
note Note
studied byStudied by 7 people
... ago
5.0(1)
note Note
studied byStudied by 3 people
... ago
5.0(1)
note Note
studied byStudied by 28 people
... ago
5.0(2)
note Note
studied byStudied by 34808 people
... ago
4.8(363)
note Note
studied byStudied by 11 people
... ago
5.0(1)

Explore top flashcards

flashcards Flashcard (26)
studied byStudied by 51 people
... ago
5.0(2)
flashcards Flashcard (96)
studied byStudied by 46 people
... ago
4.0(1)
flashcards Flashcard (49)
studied byStudied by 32 people
... ago
5.0(1)
flashcards Flashcard (81)
studied byStudied by 23 people
... ago
5.0(2)
flashcards Flashcard (32)
studied byStudied by 2 people
... ago
5.0(1)
flashcards Flashcard (37)
studied byStudied by 20 people
... ago
5.0(2)
flashcards Flashcard (30)
studied byStudied by 178 people
... ago
5.0(2)
flashcards Flashcard (30)
studied byStudied by 36 people
... ago
5.0(4)
robot