Week 3 - data types Flashcards

1
Q

Characteristics of the compound data type - List?

A

A list is a collection which is ordered, changeable and allows duplicates.
Held inside [ ].

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Characteristics of the compound data type - Tuple?

A
A tuple is a collection that is ordered and unchangeable.  Allows duplicates.
Held inside ( )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Characteristics of the compound data type - Dictionary?

A

A dictionary is a collection which is not ordered, changeable and indexed. No duplicates allowed.
Held inside { }
Contains a key:value - the value is assigned to the key.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Characteristics of the compound data type - Sets?

A

A set is a collection which is NOT ordered or indexed.
No duplicates allowed, once created the set can not be changed, but can be added to.
Held inside { }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the syntax used when calling any value in a data collection/array?

A

[ ] - square brackets

variable[1]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is Imperative programming

A

Imperative programming uses statements to change the programs state.
Flexible, but more complex.
Focuses on how the program receives the result.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does x == y translate as?

A

x is equal to y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does x != y translate as?

A

x does not equal y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does x > y mean?

A

x is greater than y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does x < y mean?

A

x is less than y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does x >= y mean?

A

x is greater than or equal to y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does x <= y mean?

A

x is less than or equal to y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does AND do?

A

Used as a condition and it means that both conditions should be meet.
The program will stop after the first false.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does OR do?

A

Used as a condition and it means that either condition could be meet.
The program will stop after the first true.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is abstraction?

A

This is a key concept in object orientated programming.
It’s main goal is to handle complexity by hiding unnecessary detail from the user to implement more complex logic on top of the provided abstraction.
This can be done without understanding or even thinking about all the hidden complexity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly