Week 1 Day 2 Presentation
Week 1 Day 2 Presentation
01 02
NUMBERS 1, 2.00 STRINGS “ABCD?@”
[Integers (Int), Floating [Sequence of characters]
Point(Float) and Complex
Numbers]
03
Boolean
[True, False]
NON-PRIMITIVE DATA TYPES
ALSO KNOWN AS DATA STRUCTURES
1. Lists (arrays) []
2. Tuples (immutable lists) ()
3. Dictionaries (hash tables) {}
4. Sets (unordered collections) {}
MUTABLE / IMMUTABLE
1. Lists
2. Dictionaries
3. Sets
MUTABLE / IMMUTABLE
1. Integers
2. Floats
3. Strings
4. Tuples
5. Boolean values
6. Frozen sets
The type() function can be used to check the
type of an object in python
CASTING
Casting is the process of converting an object of one data type into
another.
Casting is useful when you need to:
X = 23
Print(x)
COMMENT
S
Comments are lines of code that are ignored by the interpreter but
are useful for humans to understand the code.
OPERATORS
Arithmetic Operators
+ - * / // % **
Comparison Operators
== (Equal to), != (Not equal to), > (Greater than), < (Less than) >=
(Greater than or equal to), <= (Less than)
Assignment Operators
= (Assignment), += (Addition assignment), -= (Subtraction assignment) *=
(Multiplication assignment), /= (Division assignment) **=
(Exponentiation assignment), %= (Modulus assignment), //=
(Floor Division assignment)
THANKS FOR
LISTENING!