Chapter 2 Flashcards

1
Q

Low level versus high level lang

A

low level : move bits of data around high level : abstract primitives like pop up menu provided by the designer

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

general versus targeted to an application

A

refers to how widely applicable a language’s primitive operations are. IE adobe flash is made for web animation/interactivity

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

interpreeted vs compiled

A

compiled: a language is executed directly with source code similar to machine code interpreted: converted from source into machine level primitive operations

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

statement

A

or a command ie : print “print print”

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

scalar object types

A

integers (int 4 -1337 ) floating point numbers (float 1.46 and 1.5E6 {i.5*10^6) Boolean (bool) True or False) aaand None

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

integer division

A

// returns quotient without remainder

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

modulo

A

or mod or in python:: i % j returns remainder of i divided by j

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

a and b

A

if both are True then True otherwise False

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

a or b

A

if at least one of a or be is true then True otherwise False

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

not a

A

True if a is false and False if a is True

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

straight line programs

A

execute one statement after another in the order in which they appear then stop

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

conditional statement

A

if boolean expression:

block of code

else :

block of code

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

constant time

A

a program for which the maximum running time is bounded by the length of the program is said to run in constant time (runnning time does not grow with the size of the input to the program)

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