Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Computer Science Pretest

Total questions: 50

Worksheet time: 45mins

Name
Class
Date
1.

What is the main function of the CPU in a computer?

a)

Store data

b)

Process instructions

c)

Display images

d)

Connect to the internet

2.

Which language is considered a high-level programming language?

a)

Assembly

b)

Machine language

c)

Python

d)

Binary

3.

What does HTML stand for?

a)

HyperText Machine Language

b)

HyperText and Links Markup Language

c)

HyperText Markup Language

d)

HyperTool Multi Language

4.

Which of the following is not an operating system?

a)

Windows

b)

Linux

c)

Python

d)

macOS

5.

What is an algorithm?

a)

A programming language

b)

A step-by-step procedure to solve a problem

c)

A type of computer virs

d)

A software application

6.

Which of the following is used to style web pages?

a)

HTML

b)

CSS

c)

JavaScript

d)

SQL

7.

What does the acronym 'GUI' stand for?

a)

General User Interface

b)

Graphical User Interface

c)

Guided User Interface

d)

Graphical Unified Interface

8.

Which of the following is an example of application software?

a)

Microsoft Word

b)

Linux

c)

BIOS

d)

CPU

9.

Which of the following is a logical operator in most programming languages?

a)

&

b)

%

c)

&&

d)

$

10.

Which type of loop is guaranteed to execute at least once?

a)

For loop

b)

While loop

c)

Do-while loop

d)

Infinite loop

11.

What is the main purpose of a compiler?

a)

To execute code line by line

b)

To translate high-level code into machine code

c)

To debug programs

d)

To design algorithms

12.

Which of the following is a characteristic of an object-oriented programming language?

a)

Functions

b)

Procedures

c)

Objects and classes

d)

Variables

13.

What is an IP address?

a)

A unique identifier for a computer on a network

b)

A programming language

c)

A type of software

d)

A hardware component

14.

Which of the following is not a programming paradigm?

a)

Procedural programming

b)

Object-oriented programming

c)

Functional programming

d)

Binary programming

15.

What does SQL stand for?

a)

a) Simple Query Language

b)

b) Structured Query Language

c)

c) Sequential Query Language

d)

d) Standard Query Language

16.

Which of the following is a binary number?

a)

a) 1010

b)

b) 1234

c)

c) 5678

d)

d) 91011

17.

What is a firewall in computer networks?

a)

a) A software to prevent viruses

b)

b) A hardware device to speed up network connections

c)

c) A network security system that monitors and controls incoming and outgoing network traffic

d)

d) A type of malware

18.
Which of the following is not a high level programming language?
a)
Assembly
b)
C++
c)
Java
d)
Python
19.
The computer's _________ memory (ex. thumb drives, hard drives, cloud storage: ie. Dropbox)
a)
temporary 
b)
internal
c)
external 
d)
important 
20.

Which of the following is a benefit of cloud computing?

a)

The ability to make a backup copy of your cloud computing software

b)

The reliability of locally installed applications

c)

Scalable storage capacity

d)

Needs to be installed on the computer.

21.

An error in a program that prevents the program from running as expected.

a)

mistake

b)

bug

c)

crash

d)

help

22.
Code is the:
a)
order of events
b)
instruction given to a computer by a programmer
c)
paragraphs
d)
language written by humans to communicate with computers
23.

While developing a program, you find a similar project that someone has created and posted online. It contains a number of elements (e.g., images, music, code segments, etc.) that you would like to integrate into your own project. Under what conditions may you reuse these elements in your work?

a)

You may never reuse someone else’s work.

b)

You may reuse any elements that are posted publicly online as long as credit is given to their creator.

c)

You may only reuse elements for which the original owner has granted a license to reuse, such as the Creative Commons Share Alike license.

d)

You may always reuse anything that is posted publicly or privately online.

24.

Consider the above code segment.


Which of the following best describes the result of running the code segment?

a)

The number 0 is displayed.

b)

The number 4 is displayed.

c)

The number 10 is displayed.

d)

Nothing is displayed; the program results in an infinite loop.

25.

The volume of a rectangular prism is calculated by multiplying its length, width and height. What could be substituted into the section of the code marked < missing code > that would accurately calculate the volume based on the user input of l, w and h?

a)

l x w x h

b)

l * w * h

c)

l(w)(h)

d)

l / w / h

26.

ASCII is a character-encoding scheme that uses a numeric value to represent each character. For example, the uppercase letter “G” is represented by the decimal (base 10) value 71. A partial list of characters and their corresponding ASCII values are shown in the table above.


ASCII characters can also be represented by binary numbers. According to ASCII character encoding, which of the following letters is represented by the binary (base 2) number 1010100?

a)

N

b)

P

c)

T

d)

W

27.

Which of the following decimal (base-10) values is equivalent to the binary (base-2) value 101001?

a)

22

b)

37

c)

41

d)

82

28.

What value does the above code segment display?

a)

17

b)

36

c)

53

d)

No value is ever displayed because the algorithm repeats the REPEAT UNTIL block indefinitely.

29.

The procedure check is called in a program after each time a True or False question is answered. If the user types in True True False True as their answers for four questions on a quiz, what should their overall score be?

a)

25%

b)

50%

c)

75%

d)

100%

30.

ASCII is a character-encoding scheme that uses 7 bits (8 bits if you are using the extended ASCII table) to represent each character. The decimal (base 10) values 65 through 90 represent the capital letters A through Z, as shown in the table above.


Which ASCII character is represented by the binary (base 2) number 1000001?

a)

A

b)

B

c)

C

d)

D

31.

Which of the following is an advantage that text-based programming languages (e.g., Processing) have over block-based programming languages (e.g., Scratch)?

a)

Text-based programming languages allow programmers to write programs in English and other natural languages.

b)

Text-based programming languages do not require the programmer to worry about syntax, capitalization, or punctuation.

c)

Programs written in text-based programming languages do not require debugging.

d)

Text-based programming languages offer programmers more detailed control over lower-level functionality when writing a program.

32.

In order to be inducted into a school’s National Honor Society (NHS), they must meet certain criteria for their GPA, serviceHours and grade. The expression below indicates whether a student has been accepted as a member of the NHS.


(GPA = 3.65) AND (serviceHours = 30) AND (NOT grade = 9)


Which of the following values would indicate a student that would be accepted into NHS?

a)

GPA = 3.85, serviceHours = 45, grade = 9

b)

GPA = 3.50, serviceHours = 100, grade = 10

c)

GPA = 4.00, serviceHours = 15, grade = 11

d)

GPA = 3.65, serviceHours = 30, grade = 12

33.

Which of the following are benefits of using well-named variables in a computer program?

Select two answers.

a)

The program will run faster.

b)

The program will be easier for people to read.

c)

The program will have a greater data storage capacity.

d)

The program will be easier to modify in the future.

34.
Chaining together or placing two or more separate things side by side so that they are treated as one is the definition of
a)
concatenation
b)
ReCAPTCHA
c)
indexing
d)
extraction
e)
cache
35.
a)

2010

b)

2010105

c)

2010510

d)

20102010

e)

20101020

36.

Bit

a)

the single unit of information in a computer, typically represented as a 0 or 1

b)

A small portion of something

c)

A piece of code that represents how fast we go

d)

The download speed

37.

Protocol

a)

A set of rules governing the exchange or transmission of data between devices

b)

How we all decide to talk

c)

Rules we can change when we need to

d)

How often we can change rules

38.
Which of the following is an IP address?
a)
www.google.com
b)
192.168.2.25
c)
1024.2048.64.512.256
d)
A5:D4:23:56:FF:A4
39.

What will the following algorithm display?

a ← 13
b ← 17
a ← a + 1
c ← a / 7
DISPLAY(c)
DISPLAY(a)
DISPLAY(b)

a)

2 14 17

b)

13 17 5

c)

2 12 2

d)

14 17 2

40.

What will the following algorithm display?

a ← 13
a ← 17
a ← a + 1
DISPLAY(a)

a)

13

b)

17

c)

18

d)

19

41.

What will the following algorithm display?

a ← 26 MOD 13
DISPLAY (a)

a)

26

b)

13

c)

8

d)

0

42.

With Boolean, what does "A OR B" mean?

a)

Neither A or B can be true for the condition to be true

b)

If A is true, then the condition is true

c)

If B is not true, then the condition is always true

d)

Both A and B must be true for the condition to be true

43.

What data type would store the value: Oranges

a)

String

b)

Float

c)

Boolean

d)

Integer

44.

What data type would store the value: 6.4?

a)

String

b)

List

c)

Boolean

d)

Float

45.

What data type would store the value: True

a)

Boolean

b)

String

c)

Integer

d)

Float

46.

What data value would store the value: 9?

a)

Float

b)

Integer

c)

String

d)

Boolean

47.
Convert 128 to binary
a)
10000000
b)
01111110
c)
10000001
d)
11001100
48.
Which color is this?
a)
#FF0000
b)
#00FF00
c)
#0000FF
d)
None of these
49.
102 = 100
Which of the following is used in Python to calculate ten squared?
a)
10 ** 2
b)
10 * 2
c)
10 % 2
d)
10 ** 10
50.

Consider the following segment given in pseudo code. What will be displayed if grade is set to 70?

a)

You passed!

b)

Time to start studying again!

c)

You passed! and Time to start studying again!

d)

Nothing will be displayed

e)

An error will occur on line 7; you cannot have an IF inside an ELSE statement