Module 1 Flashcards

1
Q

A ______ language is a programming language designed to be easy for humans to read and write.

A

high-level

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

A ________ language is a programming language designed to be easy for a computer to run.

A

low-level

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

______ is a property of a program that can run on more than one kind of computer.

A

Portability

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

An _______ is a program that reads another program and executes it.

A

Interpreter

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

A ______ is a set of instructions that specifies a computation.

A

Program

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

A _______ is characters displayed by the interpreter to indicate that it is ready to take input from the user.

A

Prompt

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

A ________ is an instruction that causes the python interpreter to display a value on the screen.

A

print statement

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

An ______ is a special symbol representing simple computation.

A

operator

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

A _____ is a basic unit of data that a program manipulates.

A

value

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

A _____ is a category of values such as int, str, float, bool, etc.

A

type

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

_______ is an operator written by ______ that divides two numbers and rounds down to an integer.

A

floor division, //

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

_______ is an operator written by ______ that works on integers and returns the remainder when one number is divided by another.

A

modulus operator, %

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

An ________ is a statement that assigns a value to a variable.

A

assignment

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

A _______ is a graphical representation of a set of variables and the values they refer to.

A

state diagram

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

A ________ is used to parse a program and cannot be if, def, while.

A

keyword

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

An _______ is one of the values on which an operator operates.

A

operand

17
Q

An _______ is a combination of variables, operators and values that represents a single result.

A

expression

18
Q

_________ is a way of using the python interpreter by typing code at the prompt.

A

interactive mode

19
Q

The operators ______ and ______ don’t change based on the number of them at exist. Ex. 2 _ _ _ _ _ 2 gives the same result as 2 _ 2

A
  1. +
  2. -
20
Q

A leading zero on a number will give ________. Ex. 09

A

error

21
Q

variables ______ begin with a number and ______ uppercase letters.

A

cannot, conventionally don’t use

22
Q

_________ recognize the structure of a program and cannot be used as variable names.

A

keywords.

23
Q

An _________ is a combination of values, variables, and operators.

A

expression

24
Q

A __________ is a unit of code that has an effect, like creating a variable or displaying a value. Generally does not have values.

A

statement

25
Q

The only mathematical operators that can be used on strings are _______ and _______.

A
  1. +
  2. *
26
Q

________ begin with # and have no bearing on the code that runs.

A

comments

27
Q

A _____ can be added to the end of a statement so a new statement can be written on the same line.

A
  1. ;
28
Q

A period at the end of a statement gives _______.

A

error

29
Q

Two values ______ be multiplied without an operator between them.
ex. xy

A

cannot

30
Q

The str.method for print is given by: _____________.

A

print(“test {}”.format(1))

31
Q

Scientific notation using the str.format is given by _________. ______ add a positive or negative.

A

1) {:.#e}
don’t

32
Q

When int is used to convert from float to int it __________.

A

chops off the decimal

33
Q

To convert between integer, floating number, and string use _______, _________, ________.

A

int(), float(), str()

34
Q

A _______ is a file containing a collection of related functions. Ex. check, math

A

module

35
Q

_________ is used to access a function from a module and the format is ____________.

A

dot notation
module.function

36
Q

A variable created inside a function is ________ and exists _______ the function. Parameters are also _______.

A

local
only inside
local

37
Q

________ functions perform an action but don’t return a value. __________ functions return results.

A

void
fruitful