Topic One Flashcards

1
Q

A (n) is a set of instructions that a computer follows to perform a task

a. compiler
b. program
c. interpreter
d. programming language

A

b. program

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

The physical devices that a computer is made of are referred to as

a. hardware
b. software
c. the operating system
d. tools

A

a. hardware

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

The part of a computer that runs programs is called

a. RAM
b. secondary storage
c. main memory
d. the CPU

A

d. the CPU

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

Today, CPUs are small chips known as

a. ENIACs
b. microprocessors
c. memory chips
d. operating systems

A

b. microprocessors

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

The computer stores a program while the program is running, as well as the data that the program is working with, in

a. secondary storage
b. the CPU
c. main memory
d. the microprocessor

A

c. main memory

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

This is a volatile type of memory that is used only for temporary storage while a program is running

a. RAM
b. secondary storage
c. the disk drive
d. the USB drive

A

a. RAM

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

A type of memory that can hold data for long periods of time, even when there is no power to the computer, is called

a. RAM
b. main memory
c. secondary storage
d. CPU storage

A

c. secondary storage

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

A component that collects data from people or other devices and sends it to the computer is called

a. an output device
b. an input device
c. a secondary storage device
d. main memory

A

b. an input device

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

A video display is a (n) device

a. output
b. input
c. secondary storage
d. main memory

A

a. output

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

A __________ is enough memory to store a letter of the alphabet or a small number

a. byte
b. bit
c. switch
d. transistor

A

a. byte

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

A byte is made up of eight

a. CPUs
b. instructions
c. variables
d. bits

A

d. bits

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

In the ______ numbering system, all numeric values are written as sequences of 0s and 1s

a. hexadecimal
b. binary
c. octal
d. decimal

A

b. binary

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

A bit that is turned off represents the following value:

a. 1
b. −1
c. 0
d. “no”

A

c. 0

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

A set of 128 numeric codes that represent the English letters, various punctuation marks, and other characters is

a. binary numbering
b. ASCII
c. Unicode
d. ENIAC

A

b. ASCII

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

An extensive encoding scheme that can represent characters for many languages in the world is

a. binary numbering
b. ASCII
c. Unicode
d. ENIAC

A

c. Unicode

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

Negative numbers are encoded using the technique

a. two’s complement
b. floating point
c. ASCII
d. Unicode

A

a. two’s complement

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

Real numbers are encoded using the technique

a. two’s complement
b. floating point
c. ASCII
d. Unicode

A

b. floating point

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

The tiny dots of color that digital images are composed of are called

a. bits
b. bytes
c. color packets
d. pixels

A

d. pixels

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

If you were to look at a machine language program, you would see

a. Python code
b. a stream of binary numbers
c. English words
d. circuits

A

b. a stream of binary numbers

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

In the ____ part of the fetch-decode-execute cycle, the CPU determines which operation it should perform

a. fetch
b. decode
c. execute
d. deconstruct

A

a. fetch

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

Computers can only execute programs that are written in __________

a. Java
b. assembly language
c. machine language
d. Python

A

c. machine language

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

The ________ translates an assembly language program to a machine language program

a. assembler
b. compiler
c. translator
d. interpreter

A

a. assembler

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

The words that make up a high-level programming language are called

a. binary instructions
b. mnemonics
c. commands
d. key words

A

d. key words

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

The rules that must be followed when writing a program are called

a. syntax
b. punctuation
c. key words
d. operators

A

a. syntax

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
A (n) program translates a high-level language program into a separate machine language program a. assembler b. compiler c. translator d. utility
b. compiler
26
A _______ error does not prevent the program from running, but causes it to produce incorrect results a. syntax b. hardware c. logic d. fatal
c. logic
27
A ________ is a single function that the program must perform in order to satisfy the customer a. task b. software requirement c. prerequisite d. predicate
a. task
28
A (n) is a set of well-defined logical steps that must be taken to perform a task a. logarithm b. plan of action c. logic schedule d. algorithm
d. algorithm
29
An informal language that has no syntax rules and is not meant to be compiled or executed is called __________ a. faux code b. pseudocode c. Python d. a flowchart
b. pseudocode
30
A ___________ is a diagram that graphically depicts the steps that take place in a program a. flowchart b. step chart c. code graph d. program graph
a. flowchart
31
A __________ is a sequence of characters a. char sequence b. character collection c. string d. text block
c. string
32
A ____________ is a name that references a value in the computer’s memory a. variable b. register c. RAM slot d. byte
a. variable
33
A _________ is any hypothetical person using a program and providing input for it a. designer b. user c. guinea pig d. test subject
b. user
34
A string literal in Python must be enclosed in _________ a. parentheses. b. single-quotes. c. double-quotes. d. either single-quotes or double-quotes.
d. either single-quotes or double-quotes.
35
Short notes placed in different parts of a program explaining how those parts of the program work are called ______________ a. comments b. reference manuals c. tutorials d. external documentation
a. comments
36
A (n) makes a variable reference a value in the computer’s memory a. variable declaration b. assignment statement c. math expression d. string literal
a. variable declaration
37
This symbol marks the beginning of a comment in Python a. & b. * c. ** d. #
d. #
38
Which of the following statements will cause an error? a. x = 17 b. 17 = x c. x = 99999 d. x = ‘17’
b. 17 = x
39
In the expression 12 + 7, the values on the right and left of the symbol are called __________ a. operands b. operators c. arguments d. math expressions
a. operands
40
This operator performs integer division a. // b. % c. ** d. /
d. /
41
This is an operator that raises a number to a power a. % b. * c. ** d. /
c. **
42
This operator performs division, but instead of returning the quotient it returns the remainder a. % b. * c. ** d. /
a. %
43
Suppose the following statement is in a program: price = 99.0 After this statement executes, the price variable will reference a value of which data type? a. int b. float c. currency d. string
d. string
44
Which built-in function can be used to read input that has been typed on the keyboard? a. input () b. get_input () c. read_input () d. keyboard ()
a. input ()
45
Which built-in function can be used to convert an int value to a float? a. int_to_float () b. float () c. convert () d. int ()
b. float ()
46
A magic number is _______________ a. a number that is mathematically undefined b. an unexplained value that appears in a program’s code c. a number that cannot be divided by 1 d. a number that causes computers to crash
b. an unexplained value that appears in a program’s code
47
A __________ is a name that represents a value that does not change during the program’s execution a. named literal b. named constant c. variable signature d. key term
b. named constant
48
The instruction set for a microprocessor is unique and is typically understood only by the microprocessors of the same brand. True or False
True
49
The Python language mostly uses a compiler which is a program that translates the instructions in a high-level language to machine code. True or False
False
50
According to the behavior of integer division, when an integer is divided by an integer, the result will be a float. True or False
False
51
Python formats all floating-point numbers to two decimal places when outputting with the print statement. True or False
False
52
In Python, print statements written on separate lines do not necessarily output on separate lines. True or False
True
53
Select all that apply. To create a Python program you can use Excel A word processor if you save your file as a .docx A text editor IDLE
A text editor | IDLE
54
What is the informal language, used by programmers to create models of programs, that has no syntax rules and is not meant to be compiled or executed? Flowchart Source code Algorithm Pseudocode
Pseudocode
55
The __________ function reads a piece of data that has been entered at the keyboard and returns that piece of data, as a string, back to the program. eval_input() str_input() input() output()
input()
56
Which mathematical operator is used to raise 5 to the second power in Python? / ** ^ ~
**
57
In a print statement, you can set the __________ argument to a space or empty string to stop the output from advancing to a new line. newLine stop end separator
end
58
After the execution of the following statement, the variable price will reference the value __________ price = int(68.549) 68.6 68 68.55 69
68
59
Which of the following will display 20%? print(format(0.2, '.0%')) print(format(0.2, '%')) print(format(0.2 * 100, '.0%')) print(format(20, '.0%'))
print(format(0.2, '.0%'))
60
A variable is a name that represents a value stored in the computer's ________. CPU screen memory hard drive
memory
61
A ____________ is a diagram that graphically depicts the steps that take place in a program. ``` pseudocode code algorithm program flowchart ```
flowchart
62
Comments in Python begin with the # character. True or False
True
63
According to the behaviour of integer division, when an integer is divided by an integer, the result will be a float. True or False
False
64
As per Python variable naming rules, the uppercase and lowercase characters are not distinct. True or False
False
65
A computer's CPU can only understand instructions that are written as sequence of bits. True or False
True
66
The Python language uses a compiler, which translates a high-level language program into a complete machine language program. True or False
False
67
The output of print('I\'m ready to begin') is _________ Im ready to begin 'I\'m ready to begin' I'm ready to begin I\'m ready to begin
I'm ready to begin
68
The argument _______ is passed to the print function. This specifies that the print function should print a space instead of a newline character at the end of its output. ``` backslash trailing backslash end = ' ' \' comma ```
end = ' '
69
The output of print(-5//2) is ________________ 3 - 2.5 - 2 2. 5 - 3
-3