Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Computer Programming 2 - Final Exam

Total questions: 37

Worksheet time: 1hrs 26mins

Name
Class
Date
1.
a)

2010

b)

2010105

c)

2010510

d)

20102010

e)

20101020

2.

a)

The sum of all the integers greater than y but less than or equal to x

b)

The sum of all the integers greater than or equal to y but less than or equal to x

c)

The sum of all the integers greater than y but less than x

d)

The sum of all the integers greater than y but less than or equal to x

e)

The sum of all the integers less than y but greater than or equal to x

3.
a)

0123

b)

00123

c)

0010012

d)

00100123

e)

001001200100123

4.
a)

1 4 10 2 3 4 7 5

b)

1 2 4 6 10 7 3 5

c)

1 2 3 10 6 7 4 5

d)

4 3 1 2 6 7 10 5

e)

6 3 7 4 2 1 10 4

5.
a)

1 1 2 3 4 5 6

b)

2 2 3 4 5 6 7

c)

6 6 5 4 3 2 1

d)

7 7 6 5 4 3 2

e)

7 7 7 7 7 7 7

6.
a)

Mail m = p[10].getBox (57) .getmail (4);

b)

Mail m = p[9].getBox (56).getMail(3);

c)

Mail m = p.geMail (57) .getMail (4) [10];

d)

Mail m = getMail (getBox (p[9], 560, 3)

e)

Mail m = new Mail (10, 57,.4);

7.
a)
b)
c)
d)
e)
8.
a)

I only

b)

II only

c)

III only

d)

I and II only

e)

II and III only

9.
a)

A

b)

D

c)

ABD

d)

ABCD

e)

ABCDE

10.
a)

-2 -1 0

b)

-2 -1 0 1 2

c)

0 1 2 0 1 2 0 1 2

d)

-2 0 2

e)

-2 -1 0 0 1 2 2 3 4

11.

The process of developing a sequence of instructions to enable a computer to accomplish a particular task.

a)

Iterative Algorithm

b)

Assembly Languages

c)

Computer Programming

12.

How many values does a Boolean variable have?

a)

4

b)

3

c)

2

d)

1

e)

Infinite

13.

A Boolean expression...

a)

Fixes any errors in the line of code

b)

Sets everything in it equal to each other

c)

Checks if something is true or false

d)

Loops the program to continue infinitely

14.

What is the output of an OR gate if its inputs are 0 and 0?

a)

1

b)

0

15.

What is the output of an OR gate if its inputs are 0 and 1?

a)

1

b)

0

16.

What is the output of an AND gate if its inputs are 1 and 0?

a)

1

b)

0

17.

What is the output of an AND gate if its inputs are 1 and 1?

a)

1

b)

0

18.

Which of these are logic gates?

a)

AND

b)

OR

c)

NOT

d)

IF

e)

ELSE

19.
What happens when information is entered into the computer?
a)
the computer receives it
b)
the computer processes it
c)
the computer stores it
d)
the information leaves
20.
Which task can a computer NOT perform?
a)
receive data
b)
process data
c)
produces a result
d)
it performs all of these
21.

The smallest number represented in 6 bits is

a)

0

b)

64

c)

127

d)

63

22.
Infinite Loop is a loop that repeats forever
a)
True
b)
False
23.
A computer cannot understand the directions of code even if there is a mistake in the syntax? 
a)
True
b)
False
24.
_______ is how we write code
a)
Syntax
b)
Loops
c)
Variables
d)
Functions
25.

An algorithm that has been coded into something that can be run by a machine

a)

Algorithm

b)

Program

c)

CPU

d)

Hardware

26.

Bug

a)

A computer that awaits and responds to requests for data.

b)

A computer and storage device dedicated in storing files.

c)

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

27.

Debugging

a)

Finding and fixing problems in an algorithm or program.

b)

Doing something on the internet, usually again and again, to make another personal feel angry, sad, or scared.

c)

A way to get information out of a computer.

28.

Computational Thinking

a)

Modifying a problem in such a way that it can be modeled or solved using a computer or machine.

b)

Strategies include: decomposition, pattern matching, abstraction, algorithms.

c)

Press the mouse button very quickly two times.

29.

Variable

a)

A name you make up so that you can see or do things on a website.

b)

A placeholder for a piece of information that can change.

c)

An easy-to-remember address for calling a web page.

30.

Block-based programming language

a)

Programming language that uses “blocks” or graphical programing elements, rather than writing code using text.

b)

Break a problem down into smaller pieces.

c)

The information about someone on the Internet.

31.

Conditionals

a)

Using the power of computers to solve problems

b)

Press the mouse button.

c)

Statements that only run under certain conditions.

32.

Pattern

a)

An extra piece of information passed to a function to customize it for a specific need.

b)

Computers that exist only to provide things to others.

c)

Finding similarities between things.

33.

Binary Code

a)

Break a problem down into smaller pieces.

b)

A way of representing information using only two options.

c)

Doing something on the internet, usually again and again, to make another personal feel angry, sad, or scared.

34.

Loop

a)

A number assigned to any item that is connected to the Internet.

b)

Able to be relied on as honest or truthful.

c)

The action of doing something over and over again.

35.

Code

a)

Statements that only run under certain conditions.

b)

The language that programmers create and use to tell a computer what to do.

c)

Break a problem down into smaller pieces.

36.

Function

a)

A piece of code that you can easily call over and over again.

b)

A group of computers and servers that are connected to each other.

c)

Short for "picture element", the fundamental unit of a digital image, typically a tiny square or dot that contains a single point of color of a larger image.

37.

Algorithm

a)

The most common fundamental unit of digital data .

b)

Getting help from a large group of people to finish something faster.

c)

A list of steps to finish a task.