Important definitions Flashcards

1
Q

Define ‘iteration’ (v.)

A

Iteration is the act of repeating a process with the aim of approaching a desired goal, target or result.

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

What are three levels of programming languages? (Roughly)

A

Binary (lowest)
Machine language and assembly (very low)
High level languages of varying power (eg Python)

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

Define ‘syntax’

A

The arrangement of words and phrases to create well-formed sentences in a language

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

Define ‘semantics’

A

The meaning of a word, phrase, or text.

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

What is function or method ‘overloading’? Give an example.

A
When different functions/methods have the same name but different implementations.
Eg, print & +:
>>> print(1 + 1)
2
>>> print(1.0 + 1)
2.0
>>> print(1 + 'a')
TypeError
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a ‘literal’?

A

A constant - fixed value with invariant semantics

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

What is a variable and how do we make one?

A

Stored value assigned using (=)

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

Python is an ‘imperative’ language - what does this mean?

A

Programming that uses statements that change a program’s state (eg x = 2). An imperative program consists of commands for the computer to perform and describes how a program operates.

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

Python is a ‘dynamically’ typed language - what does the mean?

A

Implicitly determines type of each literal and variable at runtime.

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