End Test Flashcards
(60 cards)
Which of the following are examples of algorithms?
Spell Checker for word processor, A recipe, A set of instructions for putting together a utility shed
Spell checker recipe and set of instructions
Which of the following are output devices?
A monitor
Which of the following outputs data in a Python program?
The print statement
Which of the following are input devices?
A mouse, Microphone
Which of the following contain information?
An audio CD, A running computer, A book
Which of the following translates and executes instructions in a programming language?
An interpreter
What is the purpose of the CPU?
Decode and execute instructions
What is the set of rules for forming sentences in a language called?
Syntax
Which of the following are general-purpose computing devices?
A laptop computer
What is IDLE used to do?
All of the above
The expression 2 ** 3 ** 2 evaluates to which of the following values?
512
The expression round(23.67) evaluates to which of the following values?
24
What must a programmer use to test a program?
A reasonable set of legitimate inputs
What must you use to create a multi-line string?
Embedded newline characters, A single pair of three consecutive double quotation marks
Which statement imports the functions sqrt and log from the math module?
from math import sqrt, log
What is used to begin an end-of-line comment?
symbol
symbol
Which of the following lists of operators is ordered by decreasing precedence?
**, *, +
What does a programmer do during the analysis phase of software development?
Decides what the program will do and determines its user interface
Which function returns a list of the named resources (functions and variables) in its argument?
dir
Assume that the variable name has the value 33. What is the value of name after the assignment name = name * 2 executes?
66
A Boolean expression using the and operator returns True when
both operands are true.
How many times does a loop with the header for count in range (10): execute the statements in its body?
10 times
What is the output of the loop for count in range(5): print(count, end = ‘ ‘)?
0 1 2 3 4
A for loop is convenient for
counting through a sequence of numbers, running a set of statements a predictable number of times.