Python Chp. 1 Flashcards

1
Q

True/False:

Computer science is the study of computers.

A

False

Computer science is the study of what can be computed.

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

True/False:

The CPU is the “brain” of the computer.

A

True

The CPU performs simple arithmetic and logical operations.

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

True/False:

Secondary memory is also called RAM.

A

False

The RAM is considered main memory and a HDD or SSD is considered secondary memory.

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

True/False:

All information that a computer is currently working on is stored in main memory.

A

True

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

True/False:

The syntax of a language is its meaning and semantics is its form.

A

False

The syntax of a language is its form and the semantics is its meaning.

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

True/False:

A function definition is a sequence of statements that defines a new command.

A

True

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

True/False:

A programming environment refers to a place where programmers work.

A

False

A programming environment is a program designed to help programmers write programs. It usually includes auto-indenting, auto-completion, color syntax highlighting, and interactive development features.

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

True/False:

A variable is used to give a name to a value so it can be referred to in other places.

A

True

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

True/False:

A loop is used to skip over a section of a program.

A

False

A loop is used to repeat a section of a program.

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

True/False:

A chaotic function can’t be computed by a computer.

A

False

A chaotic function can be computed, however the results won’t provide any meaningful pattern.
A mathematical model is called chaotic if very small changes in the input lead to large changes in the result, making them seem random or unpredictable.

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

What is the fundamental question of computer science?

a) How fast can a computer compute?
b) What can be computed?
c) What is the most effective programming language?
d) How much money can a programmer make?

A

b) What can be computed

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

An algorithm is like a

a) newspaper
b) venus flytrap
c) drum
d) recipe

A

d) recipe

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

A problem is intractable when

a) you cannot reverse its solution
b) it involves tractors
c) it has many solutions
d) it is not practical to solve

A

d) it is not practical to solve

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

Which of the following is not an example of secondary memory?

a) RAM
b) hard drive
c) USB flash drive
d) DVD

A

a) RAM

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

Computer languages designed to be used and understood by humans are

a) natural languages
b) high-level computer languages
c) machine languages
d) fetch-execute languages

A

b) high-level computer languages

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

A statement is

a) a translation of machine language
b) a complete computer command
c) a precise description of a problem
d) a section of an algorithm

A

b) a complete computer command

17
Q

One difference between a compiler and an interpreter is

a) a compiler is a program
b) a compiler is used to translate high-level language into machine language
c) a compiler is no longer needed after a program is translated
d) a compiler processes source code

A

c) a compiler is no longer needed after a program is translated

18
Q

By convention, the statements of a program are often placed in a function called

a) import
b) main
c) program
d) IDLE

A

b) main

19
Q

Which of the following is not true of comments?

a) They make a program more efficient
b) They are intended for human readers
c) They are ignored by Python
d) In Python, they begin with a pound sign (#)

A

a) They make a program more efficient

20
Q

The items listed in the parentheses of a function definition are called

a) parentheticals
b) parameters
c) arguments
d) both b and c are correct

A

d) both b and c are correct