Understanding Algorithms and Data Types
Understanding Algorithms and Data Types
these are simulations of the behavior of an algorithm that allow determining the validity of the
same. They consist of generating a table with as many columns as there are variables in the algorithm and
follow the instructions by entering the corresponding values
What is a pseudocode?
An algorithm is defined as the set of ordered and finite steps that allow for solving a
specific problem or task. Algorithms are independent of the programming language and of
the computer that is going to be used to execute it.
What is a variable?
A variable is a data whose value can change during the development of the algorithm or execution.
of the program. That is to say, it will represent a value stored in memory that can be modified in
any moment or preserve to be used as many times as desired.
The simple data types are: numeric (integers and reals), logical (booleans), and characters.
What is a dataset?
They are the different data objects that an algorithm or program works with.
collectively as data. All data have an associated type; the type of a data is
the set (range) of values that it can take during the program
What is an arrangement?
An array is a structured data type that stores a limited set in a single variable.
of data or elements of the same type. Likewise, it is a set of memory locations.
contiguous where the lowest address corresponds to the first element and the highest address to
last.
There are languages that can only take one of two values: true or false.
In C language, there is no logical type, but it can be implemented with an integer, 0 is false and
Any number different from zero is true.
What is a character?
it is a data type in computer programs that represents the approximation of a real number.
What is a numeric type variable?
This type of data can be real or integer, depending on the type of data that will be used.
Integers: they are the values that do not have a decimal point, and can be positive or negative and the
zero.
What is an assignment?
type of operator that is used to store a value in a variable. For example, in C language,
number = 4;. The assignment operator is = and assigns the value 4 to the variable number.
These structures control how programs are executed, that is, the order of the
instructions, since they have only one point of entry and one point of exit.
What are the elements of a conditional control structure?
Process
Logical expression
Sequence of actions
What is a constant?
A constant is a piece of data that remains unchanged during the development of the algorithm or during
the execution of the program, that is, fixed values that cannot be altered by the user. The
Most programming languages allow the handling of different types of constants;
these can be integers, real numbers, characters, and strings.
se utiliza para llevar la cuenta de determinadas acciones que se pueden solicitar durante la
resolution of a problem.
What is a flowchart?
The symbols must be drawn in such a way that they can be read from top to bottom and from left to right.
to the right.
Comments should be used either in the margin or through the graphic symbol comments.
so that these are understandable by anyone who consults it.
If the diagram spans more than one sheet, it is advisable to number it and identify where it comes from.
Where is it headed.
Only decision symbols can and should have more than one flow line out.
What is coding?
In the coding stage, the algorithm defined in the design stage is transcribed into code.
recognized by the computer; that is, in a programming language; this is known as
as source code. For example, the language 'C' is a programming language and it is the one that
we will use in the present course.
What is syntax?
Syntax checks are executed first, they are the simplest and are performed by the compiler.
program each time the program is executed until the code has no errors, that is
that the syntax required by the language is correct, otherwise the compiler itself will
showing the errors found so that they can be modified and the code can be executed;
The most complicated ones are those performed by the programmer; they consist of the capture of
different values and check that the result is the desired one, that is, the programmer would have to
modify the code until the program works correctly
What is an identifier?
it is a sequence of alphabetic characters, numeric characters and the underscore. With them we can give
name variables, constants, data types, names of functions or procedures, etc.
What types can constants be?
Entera
Royals
Character
chain
An operator is a symbol that allows relating two data points in an expression and evaluating the result of the
operation.
What are the relational operators?
They describe a relationship between two values; therefore, they are used to express conditions and
compare two values. The result of a relational expression is a logical or boolean type value,
it can only be true or false
Arithmetic.
Relational.
Logical.
Assignment.
Logical expressions can be combined to form more complex expressions using the
logical operators.
The assignment operator allows evaluating an expression and assigning the result to a variable.
What are associative rules?
Operators in the same expression with the same level of precedence are evaluated
Assignment operators have lower precedence than all other operators. Therefore, the
monetary operations, arithmetic, relational, equality, and logical operations are performed before those of
assignment
What is an expression?
An expression is the result of combining operands through operators. The operands can be
variables, constants or other expressions; and the operators, arithmetic, logical or relational. The
The result of an expression is a numerical data or a logical value. To group the expressions
we use parentheses
They are words specific to the language, as the creator of it gave them a specific use. They do not
they can be used as identifiers
What is a comment?
Comments in any programming language serve to make the source code more
understandable, increase the clarity of a program, help with documentation and when used well
They can save us a lot of time.
*