wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

[TOPIC 1] Introduction to Programming

Total questions: 61

Worksheet time: 1hrs 1mins

Name
Class
Date
1.

Define programming language

a)

Vocabulary and a collection of rules that command a computer, devices, applications to work according to the written codes

b)

A set of words, abbreviations and symbols that enables a programmer to give instructions to a computer.

c)

a series of instructions that directs a computer to perform tasks.

2.

Identify the type of programming language used to write Segment 1.

a)

Low Level Language

b)

High Level Language

c)

Machine Language

d)

Assembly Language

3.

Which of the following is not a high level programming language?

a)

Assembly

b)

C++

c)

Java

d)

Machine Language

4.
An advantage of programming in High Level is
a)
Easier for us to understand
b)
Useful for device drivers
c)
Programs execute faster than other generations
5.
What is a translator?
a)
A program that converts commands into machine code
b)
A program that converts HLL to assembly code
c)
A program that converts the inputs from a keyboard
d)
A program for writing code
6.

Identify and state the type of translator that translate the Program A to Program B.

a)

Assembler

b)

Compiler

c)

Interpreter

7.

Identify type of Translator A

a)

Assembler

b)

Compiler

c)

Interpreter

8.

What is a programming paradigm?

a)

Steps by step instruction, the programmer should follow to solve a problem

b)

Steps to programming the solution of problem

c)

Both a method of problem solving and an approach to programming language design

9.

Identify the type of programming paradigm in Figure 5 (i).

a)

Logic

b)

Object-Oriented

c)

Procedural

10.

Based on statement given, identify type of programming paradigm.

a)

Procedural

b)

Object-Oriented

c)

Logic

11.

The first step in solving a problem is:

a)

Develop a solution

b)

Reflect and review

c)

Understand the problem

d)

Investigate and research the problem

12.

Which paradigm makes use of methods and attributes to encapsulate data in classes.

a)

Declarative

b)

Imperative

c)

Object oriented

d)

Low level

13.

Which paradigm offers the least amount of abstraction and is machine dependent?

a)

Declarative

b)

Imperative

c)

Object oriented

d)

Low level

14.

1. What is a programming paradigm?

a)

Steps of solving a problem

b)

Steps to programming

c)

Steps to a programming language

d)

Both a method of problem solving and an approach to programming language design

15.

Which is NOT a programming paradigm:

a)

Imperative

b)

Declarative

c)

Object Oriented

d)

Logic

e)

Java

16.

Allow programmers to write instructions using numeric codes and memory addresses.

a)

Object-Oriented Design (OOD)

b)

Low-level languages

c)

Object-oriented Programming (OOP)

d)

Portable or platform-independent

17.

Approach to program design that identifies how objects must interact with each other in order to solve problems

a)

Console

b)

Object-Oriented Design (OOD)

c)

Portable or platform-independent

d)

Windowed

18.

Term to indicate that a program can be run on a variety of platforms

a)

Console

b)

Windowed

c)

Portable or platform-independent

d)

Applet

19.

A method that focuses on telling a computer what to do to reach a certain objective. It takes a linear, top-down approach to solving problems by creating routines and subroutines that perform computations.

a)

Programming Paradigm

b)

Procedural Programming

c)

Declarative Programming

d)

Object-Oriented Programming (OOP)

20.

A programming paradigm based on the concept of objects which can contain both data and programming code.

a)

Declarative Programming

b)

Object-Oriented Programming (OOP)

c)

Encapsulation

d)

Version Control Systems (VCS)

21.

What is the Prolog programming language known for?

a)

Prolog is known for its use in web development and design.

b)

Prolog is known for its use in agriculture and farming.

c)

Prolog is known for its use in fashion and clothing design.

d)

Prolog is known for its use in artificial intelligence and computational linguistics.

22.

What are the limitations of Prolog programming language?

a)

Prolog has no limitations

b)

Prolog is standardized and easy to debug

c)

Prolog has limitations such as inefficiency in handling large databases, lack of standardization, and difficulty in debugging complex programs.

d)

Prolog is highly efficient in handling large databases

23.

How are problems typically solved in logical programming?

a)

Through explicit sequences of commands

b)

By defining rules and facts, and querying the system

c)

Using class hierarchies and inheritance

d)

By direct manipulation of memory addresses

24.

Which of the following is a characteristic of logical programming languages?

a)

Imperative execution

b)

Object orientation

c)

Rule-based execution

d)

Sequential flow of control

25.

(a) Given these four programming languages – C#, FORTRAN, Java and Prolog.


Identify programming language that using object oriented paradigm style?

note : if the answer is more than 1 separate it using comma ( , )

(a)  

26.

(a) Given these four programming languages – C#, FORTRAN, Java and Prolog.


Identify programming language that using procedural paradigm style?

note : if the answer is more than 1 separate it using comma ( , )

(a)  

27.

Which of the following describe procedural programming paradigm correctly?

a)

organizes the program code into procedures (or functions or methods).

b)

uses classes and objects to create models based on the real world environment.

c)

uses automated reasoning to compute over a set of facts and rules.

d)

easy to maintain and modify existing code as new objects are created inheriting characteristics from existing ones.

e)

Program code is written using logic notation

28.

State the advantages of procedural programming (choose 1-4 answers)

a)
Can be applied to a wide range of problems.
b)
Relatively easy to write and interpret.
c)
Reuse of code through inheritance
d)
Flexibility through polymorphism
29.

Identify disadvantages of Object Oriented Languages (Choose 1 - 4 answers)

a)
Requires a different style of thinking which can be difficult for programmers accustomed to other paradigms to pick up.
b)
OOP may not be suited to all types of problems.
c)
Generally unsuitable for smaller problems
d)
inability to reuse code
30.

What is the main advantage of using high-level languages over low-level languages?

a)

High-level languages offer direct control of hardware

b)

High-level languages remove the detail of memory addressing

c)

High-level languages have direct access to hardware

d)

Low-level languages have a one-to-one mapping with machine code instructions

31.

Which programming paradigm is primarily concerned with the flow of control?

a)

Functional programming

b)

Logical programming

c)

Object-oriented programming

d)

Procedural programming

32.

What is the main advantage of low-level languages?

a)

They offer direct control of hardware

b)

They remove the detail of memory addressing

c)

They have direct access to hardware

d)

They have a one-to-one mapping with machine code instructions

33.

Which type of programming paradigm organizes software design around data, or objects, rather than functions and logic?

a)

Object-oriented programming

b)

Logical programming

c)

Functional programming

d)

Procedural programming

34.

What is the purpose of assembly code in relation to machine code?

a)

It is used to write code using mathematical expressions

b)

It is the step above high-level languages

c)

It is the binary representation of an instruction

d)

It represents machine code instructions using mnemonics

35.

Which programming paradigm is used to solve programming problems using a specific knowledge base?

a)

Functional programming

b)

Logical programming

c)

Object-oriented programming

d)

Procedural programming

36.

Translates low level assembly language mnemonic into machine code

a)

Assembler

b)

Compiler

c)

Interpreter

37.

Program is translated line by line as the program is running

a)

Assembler

b)

Compiler

c)

Interpreter

38.

Translates source code from high level languages into object code and then into machine code

a)

Assembler

b)

Compiler

c)

Interpreter

39.

Which of the following is NOT a translator?

a)

Assembler

b)

Compiler

c)

Interpreter

d)

Executer

40.

Convert programming source code into language that the computer processor can understands.

a)

Programming Language

b)

Programming Paradigm

c)

Language Translator

d)

Procedural

41.

Which of these is incorrect machine language

a)

Machine dependent –

which cannot run on different types of computers and operating system.

b)

Need translator to convert to

low-level language

c)

Difficult to learn, modify and far to human languages.

d)

Consists of binary digits or English – like abbreviations to form instruction

42.

Which one of these can not be called source code.

a)

Java

b)

Python

c)

Visual Basic

d)

Android

43.

Which generation of computer languages used the LOAD, ADD and STORE codes,

a)

First

b)

Second

c)

Third

d)

Fourth

44.
Which of the following will allow you to translate assembly code into machine code?
a)
Interpreter
b)
Compiler
c)
Assembler
d)
All of them
e)
Assembler and compiler
45.

Which programming language can be translated by a Compiler?

a)

C

b)

Machine language

c)

Ruby

d)

JavaScript

46.

Which programming language can be translated by an Interpreter?

a)

Machine language

b)

Perl

c)

PHP

d)

Cobol

47.

What type of translator translates a program from its original language into machine code by converting the entire source program into machine language at one time?

a)

Interpreter

b)

Linker

c)

Assembler

d)

Compiler

48.

The following are programming paradigms:

a)

Java, C++, Pascal

b)

Procedural, object-oriented , Logic

c)

High Level Language, Low Level Language

49.

Example of programming that use Logic paradigm

a)

BASIC

b)

ASP

c)

JAVA

d)

PYTHON

50.
LOAD r1,
LOAD r2,
ADD r1,
DIV r1, #2
a)
Machine Code
b)
High Level
c)
Assembly Language
51.

Identify the generation of programming language that uses the program above:

a)

First Generation

b)

Second Generation

c)

Third Generation

d)

Fourth Generation

52.

This translator will stop program execution immediately if it finds a line of source code that results in an error

a)

Compiler

b)

Interpreter

53.

Which translator does not produce object code and is needed every time the code is translated?

(a)  

54.

In general, compiled code is easier to debug than interpreted code.

a)

True

b)

False

55.

You do not get access to the source code with compiled code.

a)

True

b)

False

56.

What does IDE stand for?

a)

Internal Development Environment

b)

Integrated Design Environment

c)

Internal Design Environment

d)

Integrated Development Environment

57.

If a program written in assembly language uses 400 lines of code, how many lines of machine code will there be?

a)

200

b)

400

c)

800

58.

Why are translators necessary?


check all that apply

a)

Translators convert high-level languages into machine code

b)

Computers can only understand machine code

c)

so that programmers could write using high-level languages

59.

Which creates an executable file that can then be used independently of the original source code.

a)

Compiler

b)

Interpreter

60.

Which translates and executes each line of code during runtime

a)

Compiler

b)

Interpreter

61.

'It is a low-level language'

Note: A statement may apply to more than one type of programming language.

a)

High-level

language

b)

Assembly

language

c)

Machine

code