Chapter 3 Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

T/F

Information that is stored and manipulated by computers is called data.

A

True

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

T/F

Since floating-point numbers are extremely accurate, they should generally be used instead of ints.

A

False

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

T/f

Operations like addition and subtraction are defined in the math library.

A

False

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

TF

The number of possible arrangements of n items is equal to n!.

A

True

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

TF

The sqrt function computes the squirt of a number.

A

False

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

TF

The float data type is identical to the mathematical concept of a real number.

A

True

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

TF

Computers represent numbers using base-2 (binary) representation.

A

True

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

TF

A hardware float can represent a larger range of values than a hardware int.

A

True

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

TF

Type conversion functions such as float are a safe alternative to eval for getting a number as user input.

A

False

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

TF

In Python, 4 + 5 produces the same result type as 4.0 + 5.0.

A

False

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

Which of the following is not a built-in Python data type?

A

Rational

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

Which of the following is not a built-in operation?

A

sqrt

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

In order to use functions in the math library, a program must include

A

An import statement

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

The value of 4! Is

A

24

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

The most appropriate data type for storing the value of pi is

A

Float

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

The number of distinct values that can be represented using 5 bits is

A

32

17
Q

In a mixed-type expression involving ints and floats, Python will convert

A

Ints to floats

18
Q

Which of the following is not a Python type-conversion function?

A

abs

19
Q

The pattern used to compute factorials is

A

accumulator

20
Q

In modern Python, an int value that grows larger than the underlying hardware int

A

Causes an overflow