General Ideas Flashcards

1
Q

source code > [answer] > output

A

interpreter

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

source code > [answer1] > [answer2] > executor > output

A

compiler, object code

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

shell mode

A

type commands directly into interpreter

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

program mode

A

use the interpreter to execute the entire source code as a whole

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

> > >

A

python interpreter prompt

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

runtime error

A

exception

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

values

A

objects, results of evaluating an expression

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

type conversion functions

A

int, str and float will attempt to change object to their type

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

truncation to zero

A

discard the decimal portion of the number…the number is closer to zero

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

variable

A

name that refers to a value

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

=

A

assignment token

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

==

A

equality token

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

python keywords

A
and	as	assert	break	class	continue
def	del	elif	else	except	exec
finally	for	from	global	if	import
in	is	lambda	nonlocal	not	or
pass	raise	return	try	while	with
yield	True	False	None
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

statement

A

an instruction that the interpreter can execute (ex: assignment)

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

expression

A

combination of values, operators, variables and calls to functions (ex: len(“string”))

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

value is produced by…

A

the evaluation of an expression

17
Q

ParseError

A

syntax error

18
Q

TypeError

A

attempt to combine two objects that are not compatible

19
Q

NameError

A

almost always means you used a variable before it has a value

20
Q

three lines of code to use turtle graphics

A

import turtle
window = turtle.Screen()
slim = turtle.Turtle

21
Q

Data Types

A

int, str, bool, float, list

22
Q

six comparison operators

A

==, !=, >, =,

23
Q

logical operators

A

and, or, not

24
Q

escape sequences

A

\t (tab), \n (new line)

25
Q

cursor

A

invisible marker

26
Q

collection data types (name them)

A

strings, lists