Zerotohero Python3 170809030243
Zerotohero Python3 170809030243
Chariza Pladin
Data Analyst - Accenture Inc.
[email protected]
● Intro to Python
● Why learn Python
AGENDA ●
●
Basic Python Syntax
Coding Time!
● Python Q/A
COURSE MODULE CODE COMPILER
● University of Amsterdam
- MA in Mathematics and
Computer Science 1982
● + Addition
● - Subtraction
● * Multiplication
● / Division
● % Modulus
● ** Exponent
● // Floor Division
Python Comparison Operators
● == Equal
● != Not Equal
● > Greater than
● < Less than
● >= Greater than or equal to
● <= Less than or equal to
Python Assignment Operators
● = Equal
● += Add AND
● -= Subtract AND
● *= Multiply AND
● /= Divide AND
● %= Modulus AND
● **= Exponent AND
● //= Floor Division
Python Bitwise Operators
Numeric Types
● int: Integers;
● long: Long integers of non-limited length;
● float: Floating-Point numbers, equivalent to C doubles
● complex: Complex Numbers
Sequences Types
● str: String;
● bytes: a sequence of integers in the range of 0-255; only available in Python 3.x
● byte array: like bytes, but mutable
● list
● tuple
Data Types (cont.)
Sets:
● set: an unordered collection of unique objects;
● frozen set: like set, but immutable
Mappings:
● dict: Python dictionaries, also called hashmaps or associative
arrays,
Mutable vs. Immutable Objects
Data types in Python can be distinguished based on whether objects of the type are
mutable or immutable. The content of objects of immutable types cannot be
changed after they are created.
Keys are unique within a dictionary while values may not be.
The values of a dictionary can be of any type, but the keys
must be of an immutable data type such as strings,
numbers, or tuples.
Dictionary Examples
Accessing Values in Dictionary
Updating Values in Dictionary
Deleting Values in Dictionary
Dictionary
Function
and
Methods
Dictionary
Function
and
Methods
(cont.)
Built-in
Dictionary
Functions
Strings
Syntax:
range(stop)
range(start, stop[, step])
Range() Parameters