Week 3
Week 3
developed by modules, each module is independent and are related to each other through the main body:
Example of the designed structure:
1. Home
Billing module
3. Payment orders module
Sales and Ordering Module
Inventory module
6. End
The code shows a set of steps that can be read sequentially. Mention what type of
programming paradigm is evident in the development
The structured programming paradigm.
The object-oriented programming paradigm.
The event-driven programming paradigm.
The concurrent programming paradigm.
Question 2 1 point Below is an excerpt that talks about spaghetti programming. According to the
excerpt presented, indicate whether the following statement is true or false: structured programming can be
considered spaghetti programming.
"Spaghetti code" is a pejorative term for computer programs that have a complex and
incomprehensible control flow structure. Its name derives from the fact that this type of code appears to
resemble a plate of spaghetti, i.e., a bunch of intricate, knotted strands. This style of programming is
traditionally associated with basic and old languages, where the flow was controlled by very primitive
control statements such as goto and using line numbers".
Image source: https://goo.gl/74UMVr
True
False
Question 3 1 point A program developed under the structure programming paradigm implies that
its code can be read from start to finish.
True
False
Question 4 1 point The following image shows the diagram of a software required by a customer
based on his requirements. Which of the following approaches can be considered correct?
Image source: https://goo.gl/TVhnya
It is not feasible to use structured programming since the problem is complex.
It is feasible to use structured programming since the complex system can be divided into modules and
programmed by processes or stages.
Structured programming cannot be applied since there are different control structures in the diagram.
It is feasible to use structured programming since the system has no control structures.
Question 5 1 point When implementing structured programming as a paradigm, at what stage
should the programmer explain to the client which tool he/she is considering using to make the system and
why he/she has selected it?
Problem definition.
Justification of the proposal.
Identification of modules and functions.
Establishment of test and acceptance criteria.
Question 6 1 point The following image shows a flow chart with the calculation of hours to be
paid to a worker. If you compare this diagram with a pseudocode of the same situation, which sequence is
correct?
Question 7 1 point In an algorithm you have the following instruction line: If AGE > 18 then
WRITE (You are of age) How would this line be represented in a flowchart?
A rectangle must be used and inside it write the condition AGE > 18.
A diamond must be used and within the box incorporate the condition AGE > 18 then WRITE (You are
of legal age).
A circle must be used and inside it write the condition AGE > 18.
A rhombus should be used and within it consider the condition AGE > 18. Then, with an arrow, it must
be identified if the condition is fulfilled, therefore in a rectangle is placed: WRITE (Is of legal age).
Question 8 1 point The following instructions implemented in software (in this case PHP), allow
you to add two numbers.
$first_exam_note = 10 ;
$second_exam_note = 8 ;
echo $first_exam_note + $second_exam_note ;
Which structured programming tool is being used in the above instructions?
Programming language.
Pseudocode.
Flow chart.
None of the above.
Question 9 1 point Given the following algorithm, identify which structured programming tool is
being used:
Variable actual height
Home
Write "what is your height?"
Read height
If height >= 1.90 then
Write "You are tall".
Or
If height < 1.90 then
Write "You are not tall"
End
Programming language
Pseudocode.
Flowchart
None of the above
Question 10 1 point By comparing the pseudocode and the flowchart in the following image it can
be said that:
Image
source: https://goo.gl/W1REwa
They are equivalent and represent the algorithm of the same problem.
Diagram and pseudocode are not equivalent.
The pseudocode with all primitives must be detailed in a strictly structured manner.
The flowchart is not correct, since the symbology used is not valid.
Question 11 1 point In a flowchart it is not necessary that all the symbols that compose it are
connected.
True
False
Question 12 1 point What error can be identified in the flowchart presented, when compared to its
equivalent pseudocode?Given the pseudo-language:
If condition is "true
Tasks to be performed if the condition is true
If condition is "false
Tasks to be performed if the condition is false
Question 14 1 point By comparing the flowchart presented and the respective pseudocode it can
be stated that:
Image source: https://goo.gl/iF1drh
Home
READ (b)
READ (h)
Calculate A = b * h / 2
Writing (A)
End
There are start and end primitives, 3 variable readings (b, h, A) and an assignment primitive A
There are start and end primitives, 2 variable reads (b, h), a variable write primitive (A) and an
assignment primitive (A).
3 inputs and 1 output are shown, with their respective start and stop
A pseudocode of the calculation of the area of a triangle is shown.
Question 15 1 point A company needs to implement a system in all areas of the organization
(sales, inventory, support, budget). It is decided to design a system where each of the areas is programmed
by modules independently from the others, i.e., to break down the whole into parts. For this to be feasible,
what property of structured programming must be considered?
Abstraction
Complexity
Integration
Scalability
Question 16 1 point Look at the following algorithm and then answer which structured
programming tool it represents:
Determine whether the number is positive or negative.
Define variable N: Integer.
Home
Type: Enter the entry number
Read (N)
If N > 0
Write:N is positive
Or
Write: N is negative
End
Programming language
Pseudocode
Flowchart
None of the above
Question 17 1 point Read the following statement and then indicate whether it is true or false: The
flowchart focuses on the developer knowing the context or environment of the program to be designed.
Every system has an environment surrounding it; its environment, therefore, will be a system that receives
inputs and generates outputs.
True
False
Question 18 1 point Look at the following image and then answer: what type of diagram or model
does it correspond to?
Source:
https://goo.gl/C6zLRN
Flow chart.
Context diagram.
Entity-relationship diagram.
Data dictionary.