CSCI 1250 - Introduction to Computer Science Midterm

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/113

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:43 AM on 9/12/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

114 Terms

1
New cards

A __________ has no moving parts and operates faster than a traditional disk drive.


solid state drive

2
New cards

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

program

3
New cards

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

decode

4
New cards

Modern CPUs are much ___ than the CPUs of early computers.

smaller and more powerful

5
New cards

Programs are commonly referred to as ___.

software

6
New cards

Real numbers are encoded using the ___ technique.

floating point

7
New cards

The ___ coding scheme contains a set of 128 numeric codes that are used to represent characters in the computer’s memory.

ASCII

8
New cards

The ___ translates an assembly language program to a machine language program.

assembler

9
New cards

The disk drive is a secondary storage device that stores data by ___ encoding it onto a spinning circular disk.

magnetically

10
New cards

The encoding technique used to store negative numbers in the computer’s memory is called ___.

two’s complement

11
New cards

The following is an example of an instruction written in which computer language: 10110000 ?

machine language

12
New cards

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

hardware

13
New cards

The process known as the ___ cycle is used by the CPU to execute instructions in a program.

fetch-decode-execute

14
New cards

The smallest storage location in a computer’s memory is known as a ___.

bit

15
New cards

Today, CPUs are small chips known as ___.

microprocessors

16
New cards

What is the decimal value of the following binary number 10011101 ?

157

17
New cards

What is the largest value that can be stores in one byte?

255

18
New cards

What type of volatile memory is usually used only for temporary storage while running a program?

RAM

19
New cards

Where does a computer store a program and the data that the program is working with, while the program is running?

in main memory

20
New cards

Which computer language uses short words kown as mnemonics for writing programs?

Assembly

21
New cards

Which language is reffered to as a low-level language?

Assembly language

22
New cards

Which of the following is considered to be the world’s first programmable electronic computer?

ENIAC

23
New cards

Which of the following is not a major component of a typical computer system?

the operating system

24
New cards

Which type of error prevents the program from running?

syntax

25
New cards

TRUE or FALSE: A bit that is turned off is represented by the value -1

false

26
New cards

TRUE or FALSE: A software developer is the person with the training to design, create, and test computer programs.

true

27
New cards

TRUE or FALSE: All programs are normally stored in ROM and are loaded into RAM as needed for processing.

false

28
New cards

TRUE or FALSE: RAM is a volatile memory used for temporary storage while a program is running.

true

29
New cards

TRUE or FALSE: The CPU understands instructions written in a binary machine language.

true

30
New cards

TRUE or FALSE: The main reason to use secondary storage is to hold data for long periods of time, even when the power supply to the computer is turned off.

true

31
New cards

TRUE or FALSE: The Python language uses compiler which is a program that both translates and executes the instructions in a high-level language.

false

32
New cards

A ___ error does not prevent the program from running, but causes it to produce incorrect results.

logic

33
New cards

A ___ is a name references a value in the computer’s memory.

variable

34
New cards

A ___ is a sequence of characters.

string

35
New cards

A string literal in Python must be enclosed in ___.

single-quotes or double-quotes

36
New cards

A(n) ___ is a diagram that graphically depicts the steps that take place in a program.

flowchart

37
New cards

A(n) ___ is a set of well-defined logical steps that must be taken to perform a task.

algorithm

38
New cards

After all three of the following statements execute, what value will be assigned to the ‘x’ variable?

x = 9

x = 8

x = 7

7

39
New cards

After the execution of the following statement, the variable price will reference the value ___.

price = int(68.549)

68

40
New cards

After the execution of the following statement, the variable will reference the numeric literal value as a(n) ___ data type.

sold= 256.752

float

41
New cards

After the execution of the following statement, what values will be assigned to the variables x, y, and z?

x, y, z = 9, 8, 7

x will be assigned 9, y will be assigned 8, and z will be assigned 7.

42
New cards

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.

end

43
New cards

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.

input()

44
New cards

The line continuation character is a

\

45
New cards

What is the informal language, used by programmers to create models of programs, that has no syntax rules and is not meant to me compiled or executed?

pseudocode

46
New cards

What is the output of the following code?

val = 123.456789

print(f’{val:.3f}’)

123.457

47
New cards

What is the output of the following code?

val = 123456.789

print(f’{val:,.2f}’)

123,456.79

48
New cards

What is the output of the following statement, given that value1 = 2.0 and value2 = 12?

print(value1 * value2)

24.0

49
New cards

What is the output of the following statement?

print(‘The path is D:\\sample\\test.’)

The path is D:\sample\test.

50
New cards

What is the output of the following statement?

print(I\’m ready to begin’)

I’m ready to begin

51
New cards

What is the output?

print(‘One’

»» ‘Two’

»» ‘Three’)

OneTwoThree

52
New cards

What symbol is used to mark the beginning and end of a string?

a quote mark (“)

53
New cards

When using the // operator to perform division, what happens if the result is a negative number?

The result is rounded away from zero to the nearest integer.

54
New cards

Which mathematical operator is used to raise 5 to the second power in Python?

**

55
New cards

Which of the following will display 20%?

print(f’{0.2:.0%}’)

56
New cards

A Boolean variable can reference one of two values which are ____.

True or False

57
New cards

A(n) ___ structure is a logical design that controls the order in which a set of statements execute.

control

58
New cards

After this code executes, what value will be store in the variable z?

x = 0

y = 9

z = 1

if x > y

else 50

50

59
New cards

In Python the ___ symbol is used as the equality operator.

==

60
New cards

In Python the ___ symbol is used as the not-equal-to operator.

! =

61
New cards

Multiple Boolean expressions can be combines by using a logical operator to create ___ expressions.

compound

62
New cards

The decision structure that has two possible paths of execution is known as

dual alternative

63
New cards

What does the following expression mean?

x <= y

x is less than or equal to y

64
New cards

What does the following statement mean?

if not x > 10:

x is not greater than 10.

65
New cards

What happens if the colon : is missing after an ‘if’ statement?

SyntaxError

66
New cards

What is the output of the following code?

x = 10

if x > 5 and x < 15:

»»print (“Within range”)

Within range

67
New cards

What is the output of this code?

x = 15

if x % 2 == 0:

»»print(“Even”)

else:

»»print(“Odd”)

Odd

68
New cards

What is the result of the following Boolena expression, given that x = 5, y = 3, and z = 8?

x < y or z > x

True

69
New cards

What is the result of the following Boolean expression, given that x = 5, y = 3, and z = 8?

x < y and z > x

False

70
New cards

What is the result of the following Boolean expresson, given that x = 5, y = 3, and z = 8?

not (x < y or z > x) and y < z

False

71
New cards

What will be the output?

x = 5

if x > 3:

»» print(“Less than 3”)

else:

»» z = 2

print(z + x)

Runtime Error

72
New cards

What will the following code output?

x = 20

if x >= 15:

»» print(“Pass”)

else:

»»print(“Fail”)

Pass

73
New cards

When using the ___ logical operator, both subexpressions must be true for the compound expression to be true.

and

74
New cards

When using the ___ logical operator, one or both of the subexpressions must be true for the compound expression to be true.

or

75
New cards

Which logical operator has the highest precedence?

not

76
New cards

Which logical operators perform short-circuit evaluation?

or, and

77
New cards

Which of the following conditions checks if x if not equal to 10?

if x ! = 10:

78
New cards

What is the correct ‘if’ clause to determine whether “choice” is anything other than 10?

if choice ! = 10:

79
New cards

What is the correct ‘if’ clause to determine whether ‘y’ is in the range 10 through 50, inclusive?

if y >= 10 and y <= 50:

80
New cards

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

program

81
New cards

The physcial devices that a computer is made of are referred to as ___.

hardware

82
New cards

The part of a computer that runs programs is called ___.

the CPU

83
New cards

Today, CPUs are small chips know as ___.

microprocessors

84
New cards

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

main memory

85
New cards

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

RAM

86
New cards

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

secondary storage

87
New cards

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

an input device

88
New cards

A video display is a(n) ___ device.

output

89
New cards

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

byte

90
New cards

A byte is made up of eight —-.

bits

91
New cards

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

binary

92
New cards

A bit that is turned off represents the following value:

0

93
New cards

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

ASCII

94
New cards

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

Unicode

95
New cards

Negative numbers are encoded using the ___ technique.

two’s complement

96
New cards

Real numbers are encoded using the ___ technique.

floating point

97
New cards

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

pixels

98
New cards

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

a stream of binary numbers

99
New cards

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

decode

100
New cards

Computers can only execute programs that are written in ___.

machine language