Computer Science Praxis Exam Questions

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/192

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:00 PM on 7/17/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

193 Terms

1
New cards

What are the four components of computational thinking?

· Decomposition- breaking down a complex problem or system into smaller, more manageable parts.

· Pattern Recognition- Looking for similarities among and within problems.

· Abstraction- Focusing on the important information only, ignoring irrelevant detail.

· Algorithms- Developing a step by step solution to the problem, or the rules to follow to solve the problem.

2
New cards

What is a computer?

· Devices that store, retrieve, and process data.

3
New cards

A set of instructions that a computer can execute is known as what?

Algorithms

4
New cards

1) What is the role of a programming language?

· Provide a way to create programs for a computer.

5
New cards

What is IDE?

· An integrated development environment (IDE) is software for building applications that combines common developer tools into a single graphical user interface (GUI).

6
New cards

1) What are some of the general components of an IDE?

-Compiling and building tools

-Code completion/insight

-Resource Management

-Debugging tools

7
New cards

A language that changes code to machine readable code one command at a time is known as what time of language?

Interrupted

8
New cards

What are the specific rules for programming languages when constructing programs in that language?

Syntax

9
New cards

Segments of code that are not executed by a computer and help make the problem easier to read are known as?

comments

10
New cards

What are areas of code where names, such as variables, are valid and what are two examples used to define these areas?

Scope

Whitespace(Tab)

{}

11
New cards

What type of scope is visible throughout the entire program?

Global

12
New cards

One may run into errors as they write a program. The act of looking for these errors is known as what?

Debugging

13
New cards

What are the three general types of errors?

1) Compiling

2) Run Time

3) Logic

14
New cards

The following is a segment of code:

If(sum <=50)

What are some possible tests cases, using edge casing, for this segment of code?

49, 50, 51

15
New cards

What are names that refer to values in the scope of a program?

Variables

16
New cards

Which of the following are valid variables names?

a. CowsEat4u

b. #1Fan

c. CS_For_AR

d. 411info

e. Stars Fall

f. num1

A, C, F

17
New cards

What is the process of assigning a value to a variable known as?

Initialization

18
New cards

Which if the following are correct variable declaration and initialization in our pseudocode? (Pick one)

a. num int <-- 20

b. 20 <-- int num

c. Int num <-- 20

d. Int num = 20

e. 20 = int num

C

19
New cards

What is the data type of the following values ( Integer, float, string, character, and boolean):

a. 56

b. 'Z'

c. 1.01

d. "Snake"

e. false

f. 450901023146632546

g. 0.00000000000000000000000001

h. "5120"

i. '4'

j. "true"

a. int

b. char

c. float

d. string

e. boolean

f. int

g. float

h. string

i. char

j. string

20
New cards

What are the missing data types in the following variable declarations and initializations in pseudocode?

a. _________ num <-- 4

b. ________ age <-- "34"

c. ________ hungry <-- true

a. int

b. string

c. boolean

21
New cards

Evaluate the following expressions:

a. 1-10 / 5-2

b. Integer Division: 25/2

c. 5 % 3

d. 10 % 5

e. 5*3 % 2

a. -3

b. 12

c. 2

d. 0

e. 1

22
New cards

What is the segment of code that can be called multiple times in various places inside of a program?

Procedure

23
New cards

Just because a procedure is defined does not mean it will execute. How do you execute a procedure in a program?

Call the procedure

24
New cards

What are collections of premade code that can be imported into a program for use in that program?

Libraries

25
New cards

A program generates a "random" number from a generator that uses a predetermined list of numbers and formulas. What type of number generator is being used?

26
New cards

What possible code can be inserted into the *missing code* section that will produce the following output? (n is any even integer)

int x <-- n

if(*missing code*)

print "The number is even"

else

print "The number is odd"

end if

Output: "The number is even."

x % 2 = 0

x % 2 (does not equal) 1

27
New cards

What is the output for the following segment of pseudocode?

int num <-- 2

if(num < 5)

print "Pikachu"

else

if (num < 10)

print "Bulbasar"

end if

end if

end if

"Pikachu"

28
New cards

What are the four general parts to every loop?

1) Initialization

2) condition

3) Action Block

4) increment

29
New cards

Consider the following segment of pseudocode with the missing code:

for(*missing code*)

print "I will not skateboard in the halls"

end for

If the string "I will not skateboard in the halls." executes 500 times, what might the missing code be?

(int i <-- 0 ; i < 500 ; i <-- i + 1)

30
New cards

Classify the following loops as a pretest or post test loop.

a. While loop

b. For loop

c. Do-While loop

a. pretest

b. pretest

c. posttest

31
New cards

What type of procedure calls itself inside of its definition?

Recursive

32
New cards

Consider the following pseudocode:

void h (int n)

if(n >= 4)

h(n/2)

end if

print n

end h

h(16)

what is the output from the pseudocode?

2,4,6,8

33
New cards

Linked lists use basic construct (object) known as __________. This object stores a ____________ and a reference to the next __________.

Node

Variable

Node

34
New cards

When working with a linked list where does the computer/program start in the link list?

Head

35
New cards

In a basic (singly) linked list, flow goes which way through the list?

From the head to the tail.

36
New cards

How does the computer/program know when it reaches the end of a linked list?

The last node will return null.

37
New cards

To increase the efficiency of adding items to the end of a list, what can be used and why does it increase the efficiency?

A tail can be used that points to the end of the list. It helps provide quick access to the end of the list so the program does not have to traverse the entire list.

38
New cards

Which of the following requires the longest runtime on a linked list that has a tail:

a. inserted a node at the front of the linked list?

b. Inserting a node at the end of a linked list?

c. Delete the last node from the linked list?

D. You will have to traverse down the list to the node before the last node to reference null.

39
New cards

Classify the following as linked list, array or both:

Stored in dynamic memory

Linked list

40
New cards

Classify the following as linked list, array or both:

Is a data structure

both

41
New cards

Classify the following as linked list, array or both:

Structure can grow or shrink

Linked list

42
New cards

Classify the following as linked list, array or both:

Can access items anywhere in structure quickly using indexing

Array

43
New cards

Classify the following as linked list, array or both:

Uses less memory than its counterpart of the same length.

Array

44
New cards

Classify the following as linked list, array or both:

Has to find enough memory in contiguous memory for the entire structure.

Array

45
New cards

Classify the following as linked list, array or both:

Can store a series of strings.

both

46
New cards

What are the three basic operations that can be performed on a stack data structure?

Push, Pop, Peek

47
New cards

When a program pop from a stack, which value is removed?

The last value added.

48
New cards

When a program adds to the queue, where is the value added?

To the end of the queue.

49
New cards

What are the three basic operations that can be performed on a queue?

Enqueue, dequeue, peek

poll, offer, peek

50
New cards

Stacks are _____ and queues are _______.

LIFO

FIFO

51
New cards

What data structure uses keys and corresponding values?

Dictionary

52
New cards

What is a data structure that uses edges and vertices?

graph

53
New cards

Binary trees are examples of what data structure?

graph

54
New cards

In OOP, the process of one class acquiring properties from another class is known as what?

Inheritance

55
New cards

In OOP, what is the ability to process objects differently depending on their data type or class?

Polymorphism

56
New cards

A(n) ___________ is to a blueprint as a(n) _________________ is to a house.

Class, object

57
New cards

Which of the following are OOP capable languages?

a. Python

b. C

d. Swift

d. Fortran

A, C

58
New cards

Which type of programming paradigm centers on flow being determined by events?

Event-driven

59
New cards

Constructing classes and instantiating objects from those class is an example of what type of programming paradigm?

OOP

60
New cards

Indicate the type of search or sort for the following statement:

Compares an number in a list to its neighbor to the right. It will swap the item if it is greater than its neighbor. As passes continue, larger values seem to travel to the right of the list of values.

Bubble sort

61
New cards

Indicate the type of search or sort for the following statement:

Has an average-case performance of O(n^2).

Bubble sort, insertion sort, and selection sort

62
New cards

Indicate the type of search or sort for the following statement:

A search that has to be presorted before it will work

Binary Search

63
New cards

A divide and conquer sort algorithm that divides list into smaller partitions until one item is inside each list. It then merges the smaller lists into larger list until one sorted list remains.

Merge Sort

64
New cards

Has an average-case performance of O(nlog^2n).

Merge sort and quick sort

65
New cards

What is the terminating case (ends he recursive call) inside of a recursive function?

Base Case

66
New cards

Searches an unsorted part of a list to find the best item for a specific location in the list (e.g. smallest number to the first index). If there is a better item for the specified location, the items are swapped.

Selection Sort

67
New cards

A program generates a "random" number from a generator that uses a predetermined list of numbers and formulas. What type of number generator is being used?

pseudo-random

68
New cards

What networking hardware device directs the data leaving the network on where to go over the internet to other networks

Router

69
New cards

What type of network connects devices over a relatively short distance and this type of network is commonly found in homes and small businesses.

LAN (Local Area Network)

70
New cards

What are some advantages/disadvantages of storing data in the cloud compared to storage on a local network?

Advantages are data backup if local machine crashes, not limited to local machine memory sizes can access from different devices. Disadvantages are that you need internet access.

71
New cards

Identify the protocol for the following statement:

A set of rules that govern the format of data sent over the internet.

A) SMPT

B) DHCP

C) IP

D) FTP

E) TCP

IP (Internet Protocol)

72
New cards

Identify the protocol for the following statement:

A protocol that is used to transfer and manipulate files on the internet.

A) SMPT

B) DHCP

C) IP

D) FTP

E) TCP

FTP (File Transfer Protocol)

73
New cards

Identify the protocol for the following statement:

A protocol for e-mail messages on the internet.

A) SMPT

B) DHCP

C) IP

D) FTP

E) TCP

SMTP (Simple Mail Transverse Protocol)

74
New cards

Identify the protocol for the following statement:

Assigns internet addressed to computers and user.

A) SMPT

B) DHCP

C) IP

D) FTP

E) TCP

DHCP (Dynamic Host Configuration Protocol)

75
New cards

Identify the protocol for the following statement:

A set of rules that governs the delivery of data over the internet and sets up a connection between the sending and receiving computers.

A) SMPT

B) DHCP

C) IP

D) FTP

E) TCP

TCP (Transmission Control Protocol)

76
New cards

Identify if the following IPv4 addresses are valid or invalid:

a). 255.255.255.255

b) 1.0.234

c) 192.156.12.10

d) 1e4:10:f119:8a2e:560:7b2a:1

a) Valid

b) Invalid

c) Valid

d) Valid

e) Invalid

77
New cards

Answer the following question in regards to data being transferred over the internet:

What is data broken down into and transferred over the internet as?

Data Packets

78
New cards

Answer the following question in regards to data being transferred over the internet:

Do data packets all take the same route to get to the target machine?

No

79
New cards

Answer the following question in regards to data being transferred over the internet:

What happens if the receiving device is missing a packet?

It request the sender to send that packet of data again.

80
New cards

A file 4.5KB in size. What is the files probable file type?

a) Text

b) Image

c) Audio

d) Video

A) Text

81
New cards

Which of the following is a video file format?

a) .xls

b) .jpeg

c) .mp3

d) .wmv

D) .wmv

82
New cards

Exactly 2KB is exactly how many bytes?

2048 Bytes

83
New cards

Convert the following binary number to their decimal equivalent:

10100

20

84
New cards

Convert the following binary number to their decimal equivalent:

1100111

103

85
New cards

Convert the following binary number to their decimal equivalent:

101

5

86
New cards

Convert the following binary number to their decimal equivalent:

111

15

87
New cards

Convert the following binary number to their decimal equivalent:

110110

54

88
New cards

Convert the following binary number to their decimal equivalent:

1011

11

89
New cards

Convert the following binary number to their decimal equivalent:

100111101100

2540

90
New cards

Transforming data from a higher level language to machine language so a computer can use is an example of what?

encoding

91
New cards

IF the ASCII decimal value for A is 65 and the value for 'a' is 97, what is the ASCII decimal value for E?

69

92
New cards

A file is compressed and its file size shrinks slightly. However, it can be decompressed back to it original file size. What type of compression may have occurred?

Lossless

93
New cards

What us lossless compression?

Lossless compression reduces a file's size with no loss of quality. This seemingly magical method of reducing file sizes can be applied to both image and audio files. Lossless compression basically rewrites the data of the original file in a more efficient way. However, because no quality is lost, the resulting files are typically much larger than image and audio files compressed with lossy compression. For example, a file compressed using lossy compression may be one tenth the size of the original, while lossless compression is unlikely to produce a file smaller than half of the original size.

94
New cards

What is lossy compression?

Lossy file compression results in lost data and quality from the original version. Lossy compression is typically associated with image files, such as JPEGs, but can also be used for audio files, like MP3s or AAC files. The "lossyness" of an image file may show up as jagged edges or pixelated areas. In audio files, the lossyness may produce a watery sound or reduce the dynamic range of the audio.

Because lossy compression removes data from the original file, the resulting file often takes up much less disk space than the original. For example, a JPEG image may reduce an image's file size by more than 80%, with little noticeable effect. Similarly, a compressed MP3 file may be one tenth the size of the original audio file and may sound almost identical.

95
New cards

Identify the following file type as taking advantage of lossless or lossy data compression:

PNG

Lossless

96
New cards

Identify the following file type as taking advantage of lossless or lossy data compression:

JPEG

Lossy

97
New cards

Identify the following file type as taking advantage of lossless or lossy data compression:

GIF

Lossy

98
New cards

Identify the following file type as taking advantage of lossless or lossy data compression:

WAV

Lossless

99
New cards

What is the process of converting data into a form that is unreadable?

Encryption

100
New cards

What is the difference between encoding and encryption?

Encoding is transforming data from one format to another and the information is not kept secret.

Encryption is transferring data into a form that can only be read by specific individuals and the information is meant to be kept secret.