wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Pretest in Basic Programming

Total questions: 50

Worksheet time: 29mins

Name
Class
Date
1.

What is a variable?

a)

Any inputted data

b)

A type of algorithm

c)

A laballed part of the computer's memory

d)

A way of repeating a block of code

2.

What type of data would your name be?

a)

Real

b)

Boolean

c)

Integer

d)

String

3.

What type of data would Pi be?

a)

Real

b)

Integer

c)

Boolean

d)

Character

4.

What type of data would the letter 'K' be?

a)

Boolean

b)

String

c)

Character

d)

Real

5.

What type of data would either True or False be?

a)

String

b)

Character

c)

Real

d)

Boolean

6.

What type of data would your age in years be?

a)

Real

b)

Integer

c)

String

d)

Boolean

7.

What term is used to describe a variable being given a value?

a)

Equals

b)

Assignment

c)

Input

d)

Algorithm

8.

What is meant by the term iteration?

a)

A list of instructions for completing a task

b)

Repeating a block of code

c)

Giving a value to a variable

d)

Breaking a problem down into simple parts

9.

What is meant by the term 'selection'?

a)

Giving a value to a variable

b)

Making a decision between different conditions

c)

Waiting for user input

d)

Outputting the result of a calculation

10.

Which of the following is NOT a mathematical operator?

a)

+

b)

=

c)

/

d)

&

11.

Which of the following is a relational operator?

a)

+

b)

-

c)

/

d)

>

12.

Which of the following is a logical operator?

a)

IF

b)

THEN

c)

AND

d)

ELSE

13.

Which of the following is NOT a logical operator?

a)

AND

b)

OR

c)

NOT

d)

IF

14.

In this algorithm, on what line is iteration first used?

a)

3

b)

4

c)

5

d)

6

15.

In this algorithm, which of the following is a variable?

a)

password

b)

loop

c)

output

d)

while

16.

It is the top programming language used by programmers from 2014 to 2018

a)

C#

b)

Java

c)

Javascript

d)

Phyton

17.

Used by computer programmers to develop software programs, scripts and other set of instructions for computer to execute.

a)

Body Language

b)

Programming language

c)

Basic Language

d)

Colloquial Language

18.

A person who develops a program using different programming language and collaborates with other specialist to improve his/her output.

a)

Computer programming

b)

Programming language

c)

Computer program

d)

Computer Programmer

19.

It is called the process of writing, editing and debugging a source code.

a)

Computer programming

b)

Programming language

c)

Computer program

d)

Computer Programmer

20.

A process of collecting instructions executed by the computer to perform a specific task.

a)

Computer programming

b)

Programming language

c)

Computer program

d)

Computer Programmer

21.

A person who practices the skills of writing or editing source code.

a)

Computer Technician

b)

Computer Encoder

c)

Computer Writer

d)

Computer Programmer

22.

ATM is machine that enable to dispense cash. ATM stands __________________.

a)

Automated Tax Machine

b)

Automated Teller Machine

c)

Automated Tin Machine

d)

Automated Top Machine

23.

When you are planning to develop a program and you have a specific task to complete, the first thing you should do is _____________________________.

a)

Start making detailed steps on what to do.

b)

Start learning how to create a program.

c)

Create a plan and sort out the things you need.

d)

Start thinking logically which makes your program more creative

24.

A programmable machine that can store, retrieve, and process data.

a)

Mouse

b)

Microphone

c)

Typewriter

d)

Computer

25.

The set of rules that defines the combinations of symbols and forms of the code.

a)

Virus

b)

Syntax

c)

Error

d)

Bug

26.

Refers to a graphical representation of an algorithm.

a)

Computer Program

b)

Algorithm

c)

Flowchart

d)

Basic Programming

27.

It is a step-by-step procedure to resolve any problem.

a)

Basic Programming

b)

Algorithm

c)

Flowchart

d)

Computer Program

28.

A computer programmer cannot write computer programs.

a)

True

b)

False

29.

Which of the following is a sequence of instructions written using a computer Programming Language to perform a specified task by the computer.

a)

Flowchart

b)

Algorithm

c)

Computer Program

d)

Program Coding

30.

What shape of flowchart symbol you will use to display the output?

a)

Rectangle

b)

Diamond

c)

Oval

d)

Parallelogram

31.

Computer programming is also called program coding.

a)

True

b)

False

32.

Which of the following is NOT a programming languages?

a)

Ruby

b)

Visual Basic

c)

Java

d)

Illustrator

33.

Which of the following flowchart symbol is used to represent arithmetic instructions?

a)

Input/Output

b)

Terminal

c)

Processing

d)

Decision

34.

Which of the following is NOT an advantage of Flowchart?

a)

Flowchart act as a guide for blueprint during program designed.

b)

It is difficult to draw flowchart for large and complex program

c)

Flowchart are better way of communicating the logic of system.

d)

Flowcharts help in debugging process.

35.

What flowchart symbol used to answer yes/no question or true/false?

a)

Processing

b)

Connectors

c)

Input/output

d)

Decision

36.

He is considered as the Father of Java programming language

a)

James Osmolu

b)

James Baldwin

c)

James Gosling

d)

James Cook

37.

The codename of the first Java version released by Oracle.

a)

Kestril

b)

Merlin

c)

Playground

d)

Dolphin

38.

In Java, there is no danger of reading bogus data when accidentally going over the size of an array.

a)

Security

b)

Portability

c)

Simplicity

d)

Automatic Memory Management

39.

A Java motto is Write it once, run it everywhere. This is made possible by the Java virtual machine.

a)

Simplicity

b)

Portability

c)

Security

d)

Automatic Memory Management

40.

A set of instructions that instructs the computer to perform a specific task.

a)

Programming

b)

Bar Code

c)

Source code

d)

Program

41.

Program code used to interpret a program from source code to low-level code.

a)

Morse Code

b)

Source Code

c)

bytecode

d)

codex

42.

A textual listing of instructions compiled or compiled into a computer executable program.

a)

Morse Code

b)

Source Code

c)

bytecode

d)

codex

43.

A set of rules that define a set of symbols that are valid phrases or expressions of a language.

a)

syntax

b)

algorithm

c)

equation

d)

program

44.

The company who acquired Sun Microsystems in 2010.

a)

Microsoft

b)

Apple

c)

Huawei

d)

Oracle

45.

The name of the team who were task to develop the “Oak”.

a)

Red Team

b)

Blue Team

c)

Yellow Team

d)

Green Team

46.
_________________ is a collection of elements used to store the same type of data.
a)
Array
b)
Switch
c)
Case
d)
Loop
47.
What are the legal indexes for the array ar, given the following declaration:
int[] ar = {2, 4, 6, 8 }
a)
 0, 1, 2, 3
b)
 1, 2, 3, 4
c)
2, 4, 6, 8
d)
 0, 2, 4, 6
48.

What is the ArrayList nums if it is initially [5, 3, 1] and the following code is executed?

nums.add(6);

nums.add(0, 4);

nums.remove(1);

a)

[4, 3, 1, 6]

b)

[5, 3, 1, 6]

c)

[4, 3, 6]

d)

[4, 5, 3, 6]

49.

What index value is used to locate the last element in the nums ArrayList?

a)

nums.size()-1

b)

nums.length()-1

c)

nums.size()

d)

nums.length

50.

Given the ArrayList nums with the values [3, 7, 6, 0], what code below is the proper way to change the 7 to be a 5?

a)

nums.set(1, 5)

b)

nums.set(7, 5)

c)

nums.set(5, 2)

d)

nums[2] = 5