Python Chp. 1 Flashcards
True/False:
Computer science is the study of computers.
False
Computer science is the study of what can be computed.
True/False:
The CPU is the “brain” of the computer.
True
The CPU performs simple arithmetic and logical operations.
True/False:
Secondary memory is also called RAM.
False
The RAM is considered main memory and a HDD or SSD is considered secondary memory.
True/False:
All information that a computer is currently working on is stored in main memory.
True
True/False:
The syntax of a language is its meaning and semantics is its form.
False
The syntax of a language is its form and the semantics is its meaning.
True/False:
A function definition is a sequence of statements that defines a new command.
True
True/False:
A programming environment refers to a place where programmers work.
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.
True/False:
A variable is used to give a name to a value so it can be referred to in other places.
True
True/False:
A loop is used to skip over a section of a program.
False
A loop is used to repeat a section of a program.
True/False:
A chaotic function can’t be computed by a computer.
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.
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?
b) What can be computed
An algorithm is like a
a) newspaper
b) venus flytrap
c) drum
d) recipe
d) recipe
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
d) it is not practical to solve
Which of the following is not an example of secondary memory?
a) RAM
b) hard drive
c) USB flash drive
d) DVD
a) RAM
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
b) high-level computer languages
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
b) a complete computer command
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
c) a compiler is no longer needed after a program is translated
By convention, the statements of a program are often placed in a function called
a) import
b) main
c) program
d) IDLE
b) main
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) They make a program more efficient
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
d) both b and c are correct