Difference: IntroductionToNopIoTAndPython (4 vs. 5)

Revision 52019-06-10 - IsaacArmahMensah

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

Start Presentation

Slide 1: Introduction to Internet of Things (IoT)

Line: 159 to 159
  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
>
>
variable.png

Data Types in Python

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

We discuss the following data types

  • Strings
  • Lists
  • Tuple
  • Dictionary
  • Byte
  • Array

String 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.

string.png

List in Python

The list is a most versatile datatype available in Python.

It can be written as a list of comma-separated values (items) between square [] brackets.

A list need not be of the same type.

The values present in a list are indexed starting from zero.

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.

list.png

Tuple in Python

Tuples are much more like a list.

They are enclosed in brackets().

Their content cannot be changed unlike the list whose content can be changed.

Thus tuples are read only.

  %SLIDESHOWEND%
Line: 167 to 211
 

Comments

Changed:
<
<
<--/commentPlugin-->
>
>

<--/commentPlugin-->
 
META FILEATTACHMENT attachment="workshop.png" attr="" comment="" date="1559196142" name="workshop.png" path="workshop.png" size="256416" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="commandline.png" attr="" comment="" date="1560048291" name="commandline.png" path="commandline.png" size="62665" user="IsaacArmahMensah" version="2"
Line: 182 to 226
 
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"
Added:
>
>
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"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback