Difference: IntroductionToNopIoTAndPython (8 vs. 9)

Revision 92019-06-13 - IsaacArmahMensah

Line: 1 to 1
 
META TOPICPARENT name="WorkshopSlides"

Start Presentation

Slide 1: Introduction to Internet of Things (IoT)

Line: 222 to 222
  The operand to the left of the = operator is the name of the variable and
the operand to the right of the = operator is the value stored in the variable.
Changed:
<
<
variable.png

>
>
variables.png
 

Data Types in Python

Programs store data in one form or the other and must be of a certain type.

Line: 312 to 312
  We have seen conditions already in the very first example
Changed:
<
<
if.png

>
>
if.png

elif.png

 

Loops

A loop statement allows us to execute a statement or group of statements multiple times.

Line: 379 to 379
  We can therefore find out if the module is imported or executed by checking the name variable:
Changed:
<
<
if _name_ == "__main__"
>
>
_if name_ == "__main__"
  this executes the main code only if not imported into a main program

Line: 415 to 415
  The syntax for creation of classes is similar to functions

Changed:
<
<
class.png
>
>
class.png
  You may define a method with name __init__which is called when
Changed:
<
<
the instance object of the class is created (in the above example: mc = !<a href="https://afnog.iotworkshop.africa/do/edit/AFNOG/MyClass?topicparent=AFNOG.IntroductionToPython;nowysiwyg=0" rel="nofollow" title="MyClass (this topic does not yet exist; you can create it)"> MyClass </a> ()
>
>
the instance object of the class is created (in the above example: mc = MyClass)
 
Changed:
<
<
The short description of the class can be found in the instance variable _ _doc__
>
>
The short description of the class can be found in the instance variable __Doc.__
 

Classes Example

Line: 435 to 435
  A very typical example of a python library is matplotlib for plotting.
Changed:
<
<
plot.png

>
>
plot1.png

plotgraph.png

 

Callbacks

callback.png

Line: 460 to 462
 
META FILEATTACHMENT attachment="commandlinearg.png" attr="" comment="" date="1560050461" name="commandlinearg.png" path="commandlinearg.png" size="15823" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="argscript.png" attr="" comment="" date="1560051009" name="argscript.png" path="argscript.png" size="30381" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="runcmdlineArg.png" attr="" comment="" date="1560051017" name="runcmdlineArg.png" path="runcmdlineArg.png" size="26649" user="IsaacArmahMensah" version="1"
Changed:
<
<
META FILEATTACHMENT attachment="variable.png" attr="" comment="" date="1560207594" name="variable.png" path="variable.png" size="222275" user="IsaacArmahMensah" version="4"
>
>
META FILEATTACHMENT attachment="variable.png" attr="" comment="" date="1560396229" name="variable.png" path="variable.png" size="206780" user="IsaacArmahMensah" version="5"
 
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="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"
Line: 475 to 477
 
META FILEATTACHMENT attachment="package.png" attr="" comment="" date="1560207164" name="package.png" path="package.png" size="34308" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="class.png" attr="" comment="" date="1560214454" name="class.png" path="class.png" size="46273" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="classes.png" attr="" comment="" date="1560214464" name="classes.png" path="classes.png" size="164398" user="IsaacArmahMensah" version="1"
Changed:
<
<
META FILEATTACHMENT attachment="plot.png" attr="" comment="" date="1560214845" name="plot.png" path="plot.png" size="98448" user="IsaacArmahMensah" version="1"
>
>
META FILEATTACHMENT attachment="plot.png" attr="" comment="" date="1560396022" name="plot.png" path="plot.png" size="102039" user="IsaacArmahMensah" version="2"
 
META FILEATTACHMENT attachment="callback.png" attr="" comment="" date="1560216243" name="callback.png" path="callback.png" size="58686" user="IsaacArmahMensah" version="1"
Added:
>
>
META FILEATTACHMENT attachment="elif.png" attr="" comment="" date="1560396010" name="elif.png" path="elif.png" size="134141" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="plotgraph.png" attr="" comment="" date="1560396031" name="plotgraph.png" path="plotgraph.png" size="180708" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="variables.png" attr="" comment="" date="1560396299" name="variables.png" path="variables.png" size="206780" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="plot1.png" attr="" comment="" date="1560396703" name="plot1.png" path="plot1.png" size="102039" user="IsaacArmahMensah" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback