Coding Fundamentals
What is a variable?
A place to store data
What is the
difference between an integer and a float variable?
Integer just
stores whole numbers or integral values, while a float variable stores numbers
with potential use of decimals.
What is a
conditional operator?
(!=, ==,
>=, <=, …). Those are operators that compare two values in a conditional
statement.
What is the
difference between using ‘=’ and ‘==’ operators?
‘=’ is used
to assign a value to a variable. “==” is a conditional operators that is used
to compare values in a conditional statement.
What are
conditional statements?
A conditional
statement is an if-then statement. The conditional is defined to be true or
false due to the operation you are leading.
What is a
loop?
It is an
operational cycle that goes through a conditional statement while this is true
and executes a block of code.
What is the
difference between a ‘for’ loop, a ‘while’ loop, and a ‘do-while’ loop?
for ()
performs statements repeatedly based on a condition.
while ()
performs statements repeatedly while condition remains true.
Do-while()
performs statements repeatedly (at least once) while condition
remains true.
What is an
array?
An array is
a data structure that contains a number of variables, which are accessed
through computed indices.
The
variables contained in an array, are called the elements of the array. They
must all be of the same type, and this type is called the element type of the
array
How do
you store/retrieve values in an array?
Declaration,
Creation, Initialization. When an array is initialized there are methods that
push or pull data into an array. Commonly the way to manipulate arrays is using
cycles (loop, while, do-while).
No hay comentarios:
Publicar un comentario