WorksheetsComputer Science Pretest
Total questions: 50
Worksheet time: 45mins
What is the main function of the CPU in a computer?
Store data
Process instructions
Display images
Connect to the internet
Which language is considered a high-level programming language?
Assembly
Machine language
Python
Binary
What does HTML stand for?
HyperText Machine Language
HyperText and Links Markup Language
HyperText Markup Language
HyperTool Multi Language
Which of the following is not an operating system?
Windows
Linux
Python
macOS
What is an algorithm?
A programming language
A step-by-step procedure to solve a problem
A type of computer virs
A software application
Which of the following is used to style web pages?
HTML
CSS
JavaScript
SQL
What does the acronym 'GUI' stand for?
General User Interface
Graphical User Interface
Guided User Interface
Graphical Unified Interface
Which of the following is an example of application software?
Microsoft Word
Linux
BIOS
CPU
Which of the following is a logical operator in most programming languages?
&
%
&&
$
Which type of loop is guaranteed to execute at least once?
For loop
While loop
Do-while loop
Infinite loop
What is the main purpose of a compiler?
To execute code line by line
To translate high-level code into machine code
To debug programs
To design algorithms
Which of the following is a characteristic of an object-oriented programming language?
Functions
Procedures
Objects and classes
Variables
What is an IP address?
A unique identifier for a computer on a network
A programming language
A type of software
A hardware component
Which of the following is not a programming paradigm?
Procedural programming
Object-oriented programming
Functional programming
Binary programming
What does SQL stand for?
a) Simple Query Language
b) Structured Query Language
c) Sequential Query Language
d) Standard Query Language
Which of the following is a binary number?
a) 1010
b) 1234
c) 5678
d) 91011
What is a firewall in computer networks?
a) A software to prevent viruses
b) A hardware device to speed up network connections
c) A network security system that monitors and controls incoming and outgoing network traffic
d) A type of malware
Which of the following is a benefit of cloud computing?
The ability to make a backup copy of your cloud computing software
The reliability of locally installed applications
Scalable storage capacity
Needs to be installed on the computer.
An error in a program that prevents the program from running as expected.
mistake
bug
crash
help
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?
You may never reuse someone else’s work.
You may reuse any elements that are posted publicly online as long as credit is given to their creator.
You may only reuse elements for which the original owner has granted a license to reuse, such as the Creative Commons Share Alike license.
You may always reuse anything that is posted publicly or privately online.
Consider the above code segment.
Which of the following best describes the result of running the code segment?
The number 0 is displayed.
The number 4 is displayed.
The number 10 is displayed.
Nothing is displayed; the program results in an infinite loop.
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?
l x w x h
l * w * h
l(w)(h)
l / w / h
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?
N
P
T
W
Which of the following decimal (base-10) values is equivalent to the binary (base-2) value 101001?
22
37
41
82
What value does the above code segment display?
17
36
53
No value is ever displayed because the algorithm repeats the REPEAT UNTIL block indefinitely.
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?
25%
50%
75%
100%
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
B
C
D
Which of the following is an advantage that text-based programming languages (e.g., Processing) have over block-based programming languages (e.g., Scratch)?
Text-based programming languages allow programmers to write programs in English and other natural languages.
Text-based programming languages do not require the programmer to worry about syntax, capitalization, or punctuation.
Programs written in text-based programming languages do not require debugging.
Text-based programming languages offer programmers more detailed control over lower-level functionality when writing a program.
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?
GPA = 3.85, serviceHours = 45, grade = 9
GPA = 3.50, serviceHours = 100, grade = 10
GPA = 4.00, serviceHours = 15, grade = 11
GPA = 3.65, serviceHours = 30, grade = 12
Which of the following are benefits of using well-named variables in a computer program?
Select two answers.
The program will run faster.
The program will be easier for people to read.
The program will have a greater data storage capacity.
The program will be easier to modify in the future.
2010
2010105
2010510
20102010
20101020
Bit
the single unit of information in a computer, typically represented as a 0 or 1
A small portion of something
A piece of code that represents how fast we go
The download speed
Protocol
A set of rules governing the exchange or transmission of data between devices
How we all decide to talk
Rules we can change when we need to
How often we can change rules
What will the following algorithm display?
a ← 13
b ← 17
a ← a + 1
c ← a / 7
DISPLAY(c)
DISPLAY(a)
DISPLAY(b)
2 14 17
13 17 5
2 12 2
14 17 2
What will the following algorithm display?
a ← 13
a ← 17
a ← a + 1
DISPLAY(a)
13
17
18
19
What will the following algorithm display?
a ← 26 MOD 13
DISPLAY (a)
26
13
8
0
With Boolean, what does "A OR B" mean?
Neither A or B can be true for the condition to be true
If A is true, then the condition is true
If B is not true, then the condition is always true
Both A and B must be true for the condition to be true
What data type would store the value: Oranges
String
Float
Boolean
Integer
What data type would store the value: 6.4?
String
List
Boolean
Float
What data type would store the value: True
Boolean
String
Integer
Float
What data value would store the value: 9?
Float
Integer
String
Boolean
Which of the following is used in Python to calculate ten squared?
Consider the following segment given in pseudo code. What will be displayed if grade is set to 70?
You passed!
Time to start studying again!
You passed! and Time to start studying again!
Nothing will be displayed
An error will occur on line 7; you cannot have an IF inside an ELSE statement
