Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Programming - Test PDF

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

SECTION A

1)

Programming languages are broadly classified into two types which is high-level languages
and low-level languages. A high-level language is any programming language that
enables development of a program in a much more user-friendly programming context and
is generally independent of the computer's hardware architecture and a Low-level
languages are languages that sit close to the computer's instruction set . An instruction set
is the set of instructions that the processor understands. Two types of low-level
language are: machine code. There are huge difference between them. Firstly, high level
languages are easy to learn and understand while low- level are challenging to learn and
understand. Secondly, high level language allows much more abstraction as and low-level
language little or no abstraction. Thirdly, in high-level language the programs are easy to
modify while modifying programs is difficult in low-level language. Thirdly, a single statement
may execute several instructions in high level language and the statements can be directly
mapped to processor instructions in low-level language. Finally, in high-level language they
do not provide many facilities at the hardware level while they are very close to the hardware
and help to write a program at the hardware level in low-level language.
2)

a)

- Readability in software programming can be defined by the ease with which the software


is read and understood.

b)

- robustness is the ability of a computer system to cope with errors during execution and
cope with erroneous input.

c)

- Usability can be described as the capacity of a system to provide a condition for its users to
perform the tasks safely, effectively, and efficiently while enjoying the experience
3)

An algorithm is a set of step-by-step procedures, or a set of rules to follow,


for completing a specific task or solving a particular problem. Such as
baking a cake, the method we uses in mathematics and etc. In
programming, an algorithm is a well-structured computational procedure that
takes some values as input some values as output. Algorithms give us the most
ideal option of accomplishing a task. There are some importance of
understanding algorithms.

Firstly, Algorithmic thinking to define clear steps to solve a problem, is crucial in many
different fields. Even if we’re not conscious of it, we use algorithms and algorithmic thinking
all the time. Algorithmic thinking allows students to break down problems and conceptualize
solutions in terms of discrete steps. Being able to understand and implement an algorithm
requires students to practice structured thinking and reasoning abilities.

Secondly, understanding algorithms improve the efficiency of a computer program. There are
different ways of solving a problem. Therefore, Some methods are well suited to give
more accurate answers than others. Algorithms are used to find the best
possible way of solving a problem. In doing so they improve the efficiency of a
program. Besides,  An algorithm also can be used to improve the speed at which a
program executes a problem. A single algorithm has the potential of reducing
the time that a program takes to solve a problem.

Thirdly, understanding algorithms will make the process more rational, more efficient and more
consistent. Efficiency is an inherent result of the analysis and specification process.
Consistency comes from both the use of the same specified process and increased skill in
applying the process. An algorithm serves as a mnemonic device and helps ensure that
variables or parts of the problem are not ignored. Presenting the solution process as an
algorithm allows more precise communication
In addition, understanding an algorithm makes it to possible. If the problem solver does not
know what was done, he or she will not know what was done wrong. As time goes by and
results are compared with goals, the existence of a specified solution process allows
identification of weaknesses and errors in the process. Reduction of a task to a specified set
of steps or algorithm is an important part of analysis, control, and evaluation.

Finally, understanding an algorithm gives a proper utilization of resources. A typical computer


has different resources. One of them is computer memory. During the execution
phase, a computer program will require some amount of memory. Some
programs use more memory space than others. The usage of computer memory
depends on the algorithm that has been used.The right choice of an algorithm
will ensure that a program consumes the least amount of memory. Apart from
memory, and the algorithm can determine the amount of processing power that
is needed by a program.
4)

A data type is a classification that dictates what a variable or object can hold in computer


programming. Data types are an important factor in virtually all computer programming
languages, including C#, C++, JavaScript, and Visual Basic. When programmers create computer
applications, both desktop and web-based, data types must be referenced and used correctly to
ensure the proper result and an error-free program. There are few examples of data type. Firstly,
String (or str or text). Used for a combination of any characters that appear
on a keyboard, such as letters, numbers and symbols. Secondly,
Character (or char). Used for single letters such as H,L,N and etc. Thirdly,
Integer (or int). Used for whole numbers such as 7,12 and etc. Next,
Float (or Real). Used for numbers that contain decimal points, or for fractions.
For example, 3.15, 18.30, ½ and etc. Finally, Boolean (or bool). Used where data
is restricted to True/False or yes/no options.

You might also like