Basic Programming Concepts - Variables, Data Types
Basic Programming Concepts - Variables, Data Types
concepts: variables,
data types
Dr Kazeem Oyebode
PhD Computer Engineering
LEARNING OBJECTIVEs
❖ input:
❖ output:
❖ arithmetic:
❖ conditional:
❖ looping:
Compilers Development Environment
❖ The data stored in memory can be of many types. For example, a person's
age is stored as a numeric value. Python has various standard data types
that are used to define the operations possible on them
Standard Data Types
❖ Subsets of strings can be taken using the slice operator ([ ] and [:] ) with
indexes starting at 0 in the beginning of the string and working their way
from -1 to the end.
❖ The plus (+) sign is the string concatenation operator
❖ The asterisk (*) is the repetition operator.
String data type
Operators
❖ These operators compare the values on either side of them and decide the
relation among them.
❖ They are also called relational operators. Assume variable ‘a’ holds the
value 10 and variable ‘b’ holds the value 20, then see next slide.
Comparison operations
Summary
Summary