Basics Flashcards

1
Q

Program

A

Set of instructions given to a computer

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

Process of program execution

A

Ingest information from the real world (input)
Process information internally
Send computed data back to the real world (output)

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

IDE

A

Integrated Development Environment

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

Comments

A

Short descriptions of non-obvious parts of the code
Information about the code, author and date at top of program

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

Syntax errors

A

Program does not conform to the structure required

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

Logic errors

A

Program runs but does not work as expected

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

Escape sequences

A

Special characters that cannot be represented easily in the program
e.g. tabs, newlines, quotes

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

2 numeric data types

A

Integers and float point numbers

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

Integers

A

Numeric data type - whole number with no fractional part

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

Floating point number

A

Numeric data type - number with fractional part
(precision limited, stores approximation of real number)

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

Modulus - symbol and function

A

%, a%b returns remainder of a/b (or subtract the nearest multiple of b from a)

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

Integer division - symbol and function

A

//, a//b returns a/b rounded toward negative infinity

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

Identifiers

A

Used to name parts of the program
Start with _ or letter, followed by zero or more of _, letter or digit

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

Reserved identifier words

A

Words which have a special meaning in python and cannot be used as identifiers
e.g. if, for, else

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

Variables

A

Sections of memory where date can be stored
Defined by assigning an initial value
Most variables have names (identifiers)

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

Input function always returns a _____

17
Q

eval() function

A

Converts a string into a number
Integer if input is integer
Float if input is not an integer

18
Q

Increment/decrement syntax

A

a+=b is equivalent to a=a+b
same for - , * and /

19
Q

Implicit conversions

A

One type of of value is converted to another
Type of narrower range is promoted up only

20
Q

Explicit conversions

A

Typecast methods such as eval(), float() or int() convert one value type to another

21
Q

Functions

A

A named sequence of instructions that perform a collective purpose

22
Q

Arguments

A

Items passed into a function