|
META TOPICPARENT |
name="WorkshopSlides" |
Slide 1: Introduction to Internet of Things (IoT) |
| |
|
< < | |
> > | |
| |
|
< < | String in Python |
> > | Strings in Python |
|
Strings in Python are identified as a contiguous set of characters represented in the quotation marks.
Python accepts either pair of single, double quotes and triples(single/double) quotes. |
|
< < | |
> > | |
|
List in Python |
|
The values stored in a list can be accessed using the slice operator ([ ] and [:]) with indexes starting at 0 in the beginning of the list and working their way to end -1. |
|
< < |
|
> > | |
| Tuple in Python
Tuples are much more like a list. |
|
Thus tuples are read only. |
|
< < | %SLIDESHOWEND% |
> > |
Dictionary in Python
A dictionary is a collection which is unordered, changeable and indexed.
In Python dictionaries are written with curly brackets, and they have keys and values.
Python's dictionaries allow you to connect pieces of related information.
Each piece of information in a dictionary is stored as a key-value pair.
When you provide a key, Python returns the value associated with that key.
You can loop through all the key-value pairs, all the keys, or all the values.
Basic Operators
Python supports multiple operators including
- arithmetic,
- comparison,
- assignment,
- logical,
- bitwise,
- membership and
- identity operators.
Arithmetic Operators:
The arithmetic operators supported by python is addition(+) , subtraction(-), multiplication(* ), division(/), modulus(%), exponent(**)
Python Bitwise Operators
Bitwise operator works on bits and performs bit-by-bit operation
%SLIDESHOWEND% |
|
-- Isaac Armah-Mensah - 2019-05-30 |
|
META FILEATTACHMENT |
attachment="runcmdlineArg.png" attr="" comment="" date="1560051017" name="runcmdlineArg.png" path="runcmdlineArg.png" size="26649" user="IsaacArmahMensah" version="1" |
META FILEATTACHMENT |
attachment="variable.png" attr="" comment="" date="1560114615" name="variable.png" path="variable.png" size="75799" user="IsaacArmahMensah" version="3" |
META FILEATTACHMENT |
attachment="thonny.png" attr="" comment="" date="1560114164" name="thonny.png" path="thonny.png" size="124394" user="IsaacArmahMensah" version="1" |
|
|
< < |
META FILEATTACHMENT |
attachment="string.png" attr="" comment="" date="1560140515" name="string.png" path="string.png" size="257733" user="IsaacArmahMensah" version="2" |
META FILEATTACHMENT |
attachment="list.png" attr="" comment="" date="1560142651" name="list.png" path="list.png" size="178624" user="IsaacArmahMensah" version="1" |
|
> > |
META FILEATTACHMENT |
attachment="string.png" attr="" comment="" date="1560198527" name="string.png" path="string.png" size="237434" user="IsaacArmahMensah" version="3" |
META FILEATTACHMENT |
attachment="list.png" attr="" comment="" date="1560198536" name="list.png" path="list.png" size="202955" user="IsaacArmahMensah" version="2" |
META FILEATTACHMENT |
attachment="dict.png" attr="" comment="" date="1560198254" name="dict.png" path="dict.png" size="198098" user="IsaacArmahMensah" version="1" |
META FILEATTACHMENT |
attachment="tuples.png" attr="" comment="" date="1560198269" name="tuples.png" path="tuples.png" size="174751" user="IsaacArmahMensah" version="1" |
META FILEATTACHMENT |
attachment="binaryops.png" attr="" comment="" date="1560199615" name="binaryops.png" path="binaryops.png" size="133142" user="IsaacArmahMensah" version="1" |
META FILEATTACHMENT |
attachment="operators.png" attr="" comment="" date="1560199627" name="operators.png" path="operators.png" size="116076" user="IsaacArmahMensah" version="1" |
META FILEATTACHMENT |
attachment="if.png" attr="" comment="" date="1560201572" name="if.png" path="if.png" size="46250" user="IsaacArmahMensah" version="1" |
META FILEATTACHMENT |
attachment="loops.png" attr="" comment="" date="1560201581" name="loops.png" path="loops.png" size="154539" user="IsaacArmahMensah" version="1" |
|