Search Header Logo
Midterm Review

Midterm Review

Assessment

Presentation

Mathematics

12th Grade

Practice Problem

Easy

Created by

Brandon Lopez

Used 14+ times

FREE Resource

0 Slides • 61 Questions

1

Fill in the Blanks

2

Fill in the Blanks

3

Multiple Select

A programming language consists of:

1

A set of rules that defines how programs should be written.

2

A way to verbally speak to a computer.

3

A set of constructs you can include in your programs.

4

A set of predefined functions.

4

Fill in the Blanks

5

Multiple Select

Any numerical value featured in your program must belong to what datatype(s)?

1

int

2

float

3

string

4

boolean

6

Multiple Choice

Any text value featured in your program must belong to what datatype(s)?

1

int

2

float

3

string

4

boolean

7

Multiple Choice

What datatype do the following values belong to:

True, False

1

int

2

float

3

string

4

boolean

8

Fill in the Blanks

9

Fill in the Blanks

10

Multiple Choice

What datatype is the following value: 246

1

int

2

float

3

string

4

boolean

5

none of the above

11

Multiple Choice

What datatype is the following value: "wick"

1

int

2

float

3

string

4

boolean

5

none of the above

12

Multiple Choice

What datatype is the following value: False

1

int

2

float

3

string

4

boolean

5

none of the above

13

Multiple Choice

What datatype is the following value: 2.5

1

int

2

float

3

string

4

boolean

5

none of the above

14

Multiple Choice

What datatype is the following value: "43"

1

int

2

float

3

string

4

boolean

5

none of the above

15

Multiple Choice

What datatype is the following value: 3.0

1

int

2

float

3

string

4

boolean

5

none of the above

16

Multiple Choice

What is the datatype of the following value: 3,000,000

1

int

2

float

3

string

4

boolean

5

none of the above

17

Multiple Choice

What is the datatype of the following value: 'True'

1

int

2

float

3

string

4

boolean

5

none of the above

18

Fill in the Blanks

19

Multiple Choice

Which of the following is not an operator?

1

*

2

//

3

==

4

$

5

<

20

Multiple Select

Which of the following operators lead to a boolean result?

1

+

2

!=

3

**

4

>=

5

<=

21

Fill in the Blanks

22

Multiple Choice

Which of the following operators has the highest precedence?

1

**

2

+

3

/

4

%

23

Multiple Choice

What is the result of the following expression: 3 + 6 % 4

1

1

2

5

3

4

4

3

24

Multiple Choice

What is the result of the following expression: 3 + 2 > 6

1

True

2

False

3

11

4

3/4

25

Multiple Choice

An operator's _____________ determines in what order operators with the same precedence are performed.

1

scope

2

precedence

3

associativity

4

congeniality

26

Multiple Choice

The exponent operator has what kind of associativity?

1

left to right

2

right to left

27

Multiple Choice

What is the result of the following expression: 5 + 4**2**3 - 1

1

4096

2

65536

3

4100

4

65540

28

Multiple Choice

What is the resulting datatype for the following kind of expressions:
int ** int
int * int

int % int
int // int
int + int

int - int

1

int

2

float

3

string

4

boolean

29

Multiple Choice

What is the resulting datatype for the following kind of expression:
int / int

1

int

2

float

3

string

4

boolean

30

Multiple Choice

An arithmetic expression involving a float results in a ____.

1

int

2

float

3

string

4

bool

31

Multiple Choice

What is the resulting datatype for the following kind of expressions:
str + str

str * int

1

int

2

float

3

string

4

boolean

32

Multiple Choice

What is the resulting datatype for any expression involving a comparison operator (e.g. >, <, ==, and, or ...)

1

int

2

float

3

string

4

boolean

33

Fill in the Blanks

34

Multiple Select

Which of the following are invalid variable names?

1

name1

2

name!

3

my name

4

Name

5

1name

35

Multiple Choice

Question image

What is the output of the program shown in the picture?

1

1100

2

2200

3

1241

4

2512

36

Multiple Choice

Question image

What is the output of the program shown in the picture?

1

hi bob

2

bob hi

3

hibob

4

ERROR

37

Fill in the Blanks

38

Multiple Choice

What keyword is used as part of a function definition?

1

if

2

while

3

else

4

def

39

Fill in the Blanks

40

Multiple Choice

Question image

How many parameters does the function shown in the picture have?

1

2

2

3

3

4

4

5

41

Fill in the Blanks

42

Multiple Choice

Question image

What is the output of the program?

1

4

2

4.0

3

5

4

5.0

43

Fill in the Blanks

44

Multiple Select

Question image

What value does a store?

1

foo(13, 6)

2

4

3

4.0

4

None

45

Fill in the Blanks

46

Multiple Select

Question image

What variables in the program have global scope?

1

a

2

b

3

x

4

y

5

z

47

Multiple Select

Question image

What variables in the program have local scope?

1

a

2

b

3

x

4

y

5

z

48

Fill in the Blanks

49

Multiple Choice

What datatype do the following functions return: int, len, abs?

1

int

2

float

3

string

4

boolean

50

Multiple Choice

What datatype do the following functions return: str and input?

1

int

2

float

3

string

4

boolean

51

Multiple Choice

What datatype does the following function return: print?

1

int

2

float

3

string

4

boolean

5

None

52

Fill in the Blanks

53

Multiple Choice

What value can the following not return: random.randint(5, 10)?

1

5

2

12

3

6

4

9

54

Fill in the Blanks

55

Multiple Choice

Question image

What is the output of the program shown in the picture?

1

positive

2

negative

3

there is no output

56

Fill in the Blanks

57

Multiple Choice

Question image

What is the output of the program shown in the picture?

1

positive

2

zero or negative

3

there is no output

58

Fill in the Blanks

59

Multiple Choice

Question image

What is the output of the program shown in the picture?

1

positive

2

zero

3

negative

4

there is no output

60

Fill in the Blanks

61

Multiple Choice

Question image

What is the output of the program shown in the picture?

1

15

2

105

3

945

4

infinite loop

Show answer

Auto Play

Slide 1 / 61

FILL IN THE BLANKS