2.
Algorithms must be logical, precise, unambiguous, correct and _____________
Explanation
Algorithms must be logical, precise, unambiguous, correct, and "finite" in order to be considered complete. The term "finite" refers to the fact that an algorithm must have a specific number of steps or iterations, and it must eventually come to an end. This is important because an algorithm that runs indefinitely would not be practical or useful in solving problems. Therefore, the requirement for an algorithm to be finite ensures that it can be executed within a reasonable amount of time and produce a result.
3.
Which is the algorithmic structure in proper order:
Correct Answer
A. Header, Declaration, Body and Terminator
Explanation
The correct order for algorithmic structure is Header, Declaration, Body, and Terminator. The header provides information about the algorithm, such as its name and any input parameters. The declaration section is where variables and constants are defined. The body contains the actual instructions and logic of the algorithm. Finally, the terminator marks the end of the algorithm.
4.
The three types of control structures that an algorithm can have are:
Correct Answer
'Sequential, Selection and Repetition', 'Sequential, Selection, Repetition'
Explanation
The correct answer is "Sequential, Selection and Repetition". These three types of control structures are commonly used in algorithms. Sequential control structure allows the program to execute instructions in a sequential order. Selection control structure is used to make decisions based on certain conditions, allowing the program to choose between different paths. Repetition control structure enables the program to repeat a set of instructions until a certain condition is met. The answer "simple, conditional and loop" does not accurately represent the types of control structures in algorithms.
5.
Input, Output, Arithmetic operation and variable assignment statements are examples of which type of structure:
Correct Answer
A. Sequential
Explanation
The given correct answer is "Sequential". This is because input, output, arithmetic operation, and variable assignment statements are executed in a sequential order, one after the other, without any repetition or branching. Sequential structure is used when we want the statements to be executed in a specific order, following a linear flow of control.
6.
Maximum=20 and count=1 are examples of statements that:
Correct Answer
A. Assign variables
Explanation
The given statements "maximum=20" and "count=1" are examples of assigning variables. In these statements, the values 20 and 1 are being assigned to the variables "maximum" and "count" respectively. This is a common practice in programming where variables are used to store and manipulate data.
7.
Print total-cost and display average are examples of statements that:
Explanation
The given statements "print total-cost" and "display average" are examples of output statements. They are used to display the values of variables or calculated results on the screen or any other output device. These statements do not assign variables or involve arithmetic operations. They solely focus on providing output to the user.
8.
Words that involves input are all of the following except:
Explanation
The word "print" is the correct answer because it does not involve taking input from the user. While "get," "accept," and "read" all involve receiving input, "print" is used to display output to the user.
9.
Which of the following words wouldn't be used in a selection structure:
Explanation
The word "repeat" wouldn't be used in a selection structure because a selection structure is used to make a decision based on a condition, whereas "repeat" suggests a looping or repetition structure. In a selection structure, the flow of the program is determined by the condition of the "if" statement, and the "else" and "then" keywords are used to specify alternative actions to be taken. However, "repeat" is typically used in a looping structure to repeat a set of instructions multiple times.
10.
What two forms can constitute pseudocode?
Correct Answer
English like and programming language
english programming language
english statements programming language statements
Explanation
The correct answer is English-like and programming language, English programming language, and English statements programming language statements. Pseudocode can be written in a combination of English-like statements and programming language syntax. It allows programmers to express their algorithmic logic using a language that is easier to understand than actual code, while still incorporating some programming language elements to make it more precise and specific.
11.
A flowchart is a ______________ representation of an algorithm.
Correct Answer
pictorial
graphical
Explanation
Both "pictorial" and "graphical" are suitable terms to describe a flowchart because it is a visual representation of an algorithm. A flowchart uses symbols and arrows to depict the sequence of steps in a process, making it easier to understand and follow. The terms "pictorial" and "graphical" both emphasize the visual nature of a flowchart, highlighting its ability to convey information through images and diagrams rather than just text.
12.
In a flowchart the parallelogram is used to:
Correct Answer
A. Input and output
Explanation
The parallelogram in a flowchart is used to represent input and output. This symbol is typically used to indicate the points where data is entered into the system or where results are displayed to the user. It signifies the interaction between the program and the external environment, allowing for data to be inputted or outputted during the execution of the flowchart.
13.
In a flowchart the diamond is used for:
Correct Answer
A. Decisions
Explanation
The diamond shape in a flowchart is used to represent decisions. It signifies a point in the flow where the program must make a choice between two or more possible paths based on certain conditions or criteria. The decision symbol typically contains a question or condition that needs to be evaluated, and the flowchart branches out into different paths depending on the outcome of the decision. This allows for logical branching and helps in representing the flow of control in a program.
14.
In a flowchart terminators for start and stop are usually indicated by what shape?
Explanation
In a flowchart, terminators for start and stop are usually indicated by the oval shape. The oval shape represents the beginning and end points of the flowchart. It signifies the start of the process or program and also the termination point where the process or program ends. The oval shape is commonly used to clearly distinguish the start and stop points from the other shapes and symbols used in the flowchart.
15.
____________ structure allow statements to be repeated a fixed number of times or until some condition evaluated to false.
Correct Answer
Repetition
loop
Explanation
The correct answer is "loop." A loop is a control structure that allows statements to be repeated a fixed number of times or until some condition evaluated to false. It provides a way to execute a block of code repeatedly, allowing for efficient and concise programming. By using loops, developers can automate repetitive tasks and save time and effort in writing and maintaining code.
16.
In a loop if the exact number of repetitions is unknown beforehand and is based on some condition, then it is called ____________ loop.
Correct Answer
conditional
Explanation
A loop where the number of repetitions is not known beforehand and is based on a condition is called a conditional loop. In this type of loop, the condition is evaluated before each iteration, and if it is true, the loop body is executed. If the condition is false, the loop terminates. This allows the loop to continue executing as long as the condition remains true, making it flexible and adaptable to different scenarios.
17.
In a flowchart what symbol often shows the flow of logic?
Correct Answer
arrows
Explanation
Arrows are commonly used in flowcharts to indicate the flow of logic or direction of the process. They connect different symbols and show the sequence of steps or decisions in the flowchart. By using arrows, the flowchart becomes more visually organized and easier to understand.
18.
In a loop if the number of repetitions is known beforehand, then the loop structure is called a _______________ loop.
Correct Answer
counted
Explanation
In a loop, if the number of repetitions is known beforehand, then the loop structure is called a "counted" loop. This means that the loop will iterate a specific number of times, as determined by the initial condition or a variable. The loop will continue until the specified number of repetitions is reached, making it a "counted" loop.
19.
Give the name of the programming language that we are going to use for IT CSEC?
Correct Answer
Pascal
Explanation
Pascal is the programming language that is going to be used for IT CSEC.
20.
Pascal is a high level language, from which generation did this language came from?
Correct Answer
third
3rd
third generation
Explanation
Pascal is a high-level programming language that was developed during the third generation of programming languages. The third generation of programming languages, which spanned from the mid-1960s to the mid-1970s, introduced high-level languages like Pascal that were designed to be more user-friendly and closer to human language than previous generations. Pascal was created by Niklaus Wirth in the late 1960s and was widely used for teaching programming and developing software during the 1970s and 1980s.