Understanding Algorithms and Data Types
Understanding Algorithms and Data Types
Definition:
a. Characteristics of an algorithm:
▪ The realization of an algorithm is a creative act based on logic.
▪ An algorithm must be finite and must terminate after a finite number of operations.
Example:
Variable students: integer;
Variable note: real;
VariablePrénom :chaines de caractères;
VariableA :booléen;
VariableOperator:character;
Digital Alphanumeric
Type of
Boolean
data Integer Real Chain of
Characters
(without the comma) (With and without the comma) characters
-345 -123,56 4,1×1038 'A,' '@' Ibn Sina
True
Examples 182 56.12 18 2 '? ‘ ‘49', '3872'
Hello Fake
2018 3 -123 '+' '$'
Note:
✓ '32' is different from 32 because '32' represents the number thirty-two while '32' represents the sequence of the digits 3 and 2.
✓ A numeric type variable cannot receive a string or boolean.