0% found this document useful (0 votes)
17 views7 pages

Activity A1 Programming - UAM

The document contains a series of questions and answers related to algorithms and programming logic, referencing various authors and their works. It discusses the structure and purpose of algorithms, types of data, and the importance of programming logic in constructing valid algorithms. Each question is followed by selected and correct answers, along with comments explaining the reasoning behind the correct responses.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views7 pages

Activity A1 Programming - UAM

The document contains a series of questions and answers related to algorithms and programming logic, referencing various authors and their works. It discusses the structure and purpose of algorithms, types of data, and the importance of programming logic in constructing valid algorithms. Each question is followed by selected and correct answers, along with comments explaining the reasoning behind the correct responses.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Course GRA0450 ALGORITHMS AND PROGRAMMING GR0049-212-9 -

202120.ead-17294.01
TestACTIVITY 1 (A1)
Question 1
1 in 1 points
According to Forbellone (2005, p. 30), "a structure
the sequential of an algorithm is related to the fact that the set
primitive actions will be executed in a linear sequence from top to
bottom and from left to right, that is, in the same way as
were written.

FORBELLONE, A. L. V. Programming Logic: the construction of


algorithms and data structures. 3rd ed. São Paulo: Prentice Hall, 2005. p.
30-31.

Considering the presented quote and the studied contents, analyze the
the following assertions and the proposed relationship between them.
I. The actions will be followed by a semicolon (;), which has the purpose of
the purpose is to separate one action from another and assist in sequential organization
the actions.
Because:
II. Upon encountering a semicolon, one must terminate the execution of
command.

Next, check the correct option.


Response
Selected: Assertion I is a true proposition, and II is
a false proposition.
Correct Answer:
Assertion I is a true proposition, and II is
a false proposition.
Comment from Correct answer. Proposition I is correct, as the
response: command sequences will end with a dot and
comma, indicating that an action has come to an end and that
may initiate another action.
Question 2
1 in 1 points
Read the following excerpt:
In order for the computer to perform tasks, it is necessary to carry out a
programming with a well-defined sequence of instructions, and this
The development of a well-defined sequence is known as an algorithm.
GUEDES, S. Logic of Algorithmic Programming. São Paulo: Pearson
Education in Brazil, 2014. p. 14.
The computer has no initiative and needs to receive instructions.
clear and detailed on how and in which occasions it should be performed
data processing. Considering this information and the content
Studied, analyze the statements below and mark T for the true ones.
For the false(s):

I. ( ) It is classified as a sequence of steps that must be


made to achieve a specific goal.
II. ( ) An algorithm is the description of a sequence of steps that must be
followed to perform a task.
III. ( ) Every task we perform in our daily lives is an algorithm, which
acts as a recipe, following the necessary steps to reach the
final result.
IV. ( ) There is only one algorithm to solve the same problem.

Based on the associations made earlier, select the alternative that


presents the correct sequence:
Selected Response:
T, T, T, F.
Correct Answer:
T, T, T, F.
Comment on the correct answer. Statement I is true, because the
answer: an algorithm is known as a sequence of steps to
step with the aim of reaching an answer. The
statement II is true, as it is a complement of
first statement, which characterizes the algorithm as being
a step by step to carry out a certain task. The
statement III is true, as it defines the algorithm as
being a daily recipe applied in the lives of people and
that also follows a step-by-step guide until finding a
solution.
Question 3
1 in 1 points
Read the following excerpt:
One of the importance of building algorithms is that once
understood an algorithmic solution for a certain problem, this
can be translated into any programming language.

FORBELLONE, A. L. V. Programming Logic: the construction of


Algorithms and data structures. 3rd ed. São Paulo: Prentice Hall, 2005. p. 3.

Based on the content studied regarding algorithms, mark the


correct alternative regarding the construction of algorithms.
Answer
Selected: An algorithm aims to provide representation
more faithful to the reasoning involved in the logic of
programming.
Correct Answer:
An algorithm aims to make the representation
more faithful to the reasoning involved in the logic of
programming.
Comment on the correct answer. In the steps determined for the
response construction of algorithms, an algorithm must have
objectivity to represent as faithfully as possible the
logical reasoning involved in programming logic.
Question 4
1 by 1 points
Considering the information presented and the content studied
about the types of data, indicate the option that presents data of type
integer, of the real type and of the character type used in the construction of a
algorithm.
Selected Answer:
0, -6.78, five.
Correct Answer:
0, -6.78, five.
Comment from Correct answer. The data that represent the types
response: inteiro, real e caractere são: 0 (inteiro), -6.78 (real) e cinco
(character).
Question 5
1 in 1 points
The main objective of the study of programming logic is the construction of
valid and comprehensive algorithms. There are three types of algorithms that
are most used: natural language, flowchart, and pseudocode.
Thus, considering the information presented and the contents
studied, analyze the following techniques and associate them with their respective
characteristics.

Programming Logic.
(2) Algorithm.
(3) Pseudocode.
Flowchart.
Natural language

Its purpose is to provide the most accurate representation of the reasoning involved.
In programming logic, and thus, it allows us to absorb a
sequence of computational details.
It consists of interpreting the statement of the problem and writing the steps to
they will be followed for the solution of the problem using graphic symbols
predefined.
( ) It consists of analyzing the problem and writing using a description.
narrative, for example, the Portuguese language, the steps for its resolution.
It consists of interpreting the statement of the problem and writing the steps to
they will be followed for their resolution through predefined rules.
The correct use of the laws of thought and processes is utilized.
reasoning in computer programming.

Based on the relationships made earlier, mark the option that


presents the correct sequence:
Selected Response:
2, 4, 5, 3, 1.

Correct Answer:
2, 4, 5, 3, 1.

Comment on the correct answer. Programming logic (1) is the science.


answer: that makes correct use of the laws of thought and processes
of reasoning used in programming
computers. Algorithm (2) has as a characteristic
represent the reasoning of programming logic and allows
the understanding of the computational details. The
pseudocode (3) makes the interpretation of the statement of
problem and write the steps to be followed for its
resolution through predefined rules. The flowchart (4)
interpret the problem statement and describe the steps to
they will be followed for the solution of the problem using
predefined graphic symbols. The natural language (5)
analyze the problem and write using a description
narrative, for example, the Portuguese language, the steps to
your resolution.
Question 6
1 out of 1 points
Read the following excerpt:
When it comes to programming, we encounter two types of values: the
variables that change according to certain conditions and that require
that the algorithm is prepared to meet these changes, and the
constant values, which do not change, always remain the same,
regardless of the condition.
Guedes, S. Algorithmic Programming Logic.
Education in Brazil, 2014. p. 7.
Based on the content studied regarding the types of processing,
mark the correct alternative regarding a variable.
Response
Selected: The variables store data that will be used
during the execution of the program.

Correct Answer:
The variables store data that will be used.
during the execution of the program.
Comment from Correct answer. Variables store data.
answer: temporarily that will be used during the
processing of the program for problem resolution
in question.
Question 7
1 point by 1 point
An algorithm can be transcribed using some techniques. Below,
an algorithm that performs the multiplication of two numbers is presented.

Algorithm
Declare N1, N2, M Numeric
Type two numbers
Read N1, N2
M N1 * N2
Multiplication =
End_Algorithm.

Considering the information presented and the content studied,


mark the option that presents the name of the type of algorithm used
to describe the presented algorithm.
Selected Answer:
Pseudocode.
Correct Answer:
Pseudocode.
Comment from Correct answer. The described algorithm is using
answer: in your transcription the type of algorithm in
pseudocode.
Question 8
1 in 1 points
Read the following excerpt:
The basic primitive types that are used in the construction of algorithms
there are four.

FORBELLONE, A. L. V. Programming Logic: the construction of


algorithms and data structures. 3rd ed. São Paulo: Prentice Hall, 2005. p.
14.

Considering the information presented and the content studied,


mark the alternative that presents the four basic primitive types
used in the construction of the algorithm.
Selected Response:
Integer, real, character, and logical.
Correct Answer:
Integer, real, character, and logical.
Comment from Correct answer. The four basic primitive types.
answer: used in the construction of algorithms are: integer, real,
character and logical.
Question 9
1 in 1 points
Read the following excerpt:
The algorithm is transformed into programming language codes.
chosen, and a program is the coding of an algorithm in a
programming language.
ASCENCIO, A. F. G.; CAMPOS, E. A. V. Fundamentals of Programming
of Computers: algorithms, Pascal, C/C++ (ANSI standard) and Java. 3rd ed.
São Paulo: Person Education of Brazil, 2012. p. 1.
Considering the presented information and the studied content, mark
the correct alternative regarding programming language.
Response
Selected: Some older programming languages
remain active and were updated, receiving new
features and adapting to the demanding reality
of advances in hardware performance and requirements
systems.

Response
Correct: Some older programming languages
remain active and have been updated, receiving new
features and adapting to the demanding reality
of advances in hardware performance and requirements
systems.

Comment on the correct answer. Some of the first languages of


answer: programming is still active and went through
updates to adapt to new requirements and to
new computational paradigms, as well as for
to follow the evolution of hardware and systems
computational.
Question 10
1 in 1 points
According to Forbellone (2005, p. 30), 'a sequential structure of a
algorithm is related to the fact that the set of primitive actions
it will be executed in a linear sequence from top to bottom and from the left
to the right, that is, in the same way they were written.

FORBELLONE, A. L. V. Logic of Programming: the construction of


algorithms and data structures. 3rd ed. São Paulo: Prentice Hall, 2005. p.
30-31.
Considering the presented quote and the studied contents, analyze the
the following assertions and the proposed relationship between them.
I. The actions will be followed by a semicolon (;), which has as
the purpose is to separate one action from another and assist in sequential organization
the actions.
Because:
II. Upon encountering a semicolon, the execution should be terminated.
command.

Next, mark the correct alternative.


Response
Selected: Assertion I is a true proposition, and II is a
false proposition.
Correct Answer:
Assertion I is a true statement, and II is a
false proposition.
Comment from Correct answer. Proposition I is correct, as the
response: command sequences will end with a period and
comma, indicating that an action has come to an end and that
may initiate another action.
Friday, October 8, 2021 5:48:15 PM BRT

You might also like