pi is for python
TRANSCRIPT
![Page 1: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/1.jpg)
Pi Is For…Programming
In
Raspberry
![Page 2: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/2.jpg)
Computers Don’t Do Anything
Without Instructions
![Page 3: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/3.jpg)
Programming, or Coding, is how we
tell computers what to do using
instructions that the computer understands.
![Page 4: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/4.jpg)
What Is A Computer Interface?
![Page 5: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/5.jpg)
Jacquard Loom Interface - 1801
![Page 6: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/6.jpg)
Switch Computer Interface - ENIAC 1945
![Page 7: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/7.jpg)
1950’s - 1960’s BusinessNo Command Line Interface
1990’s PersonalGraphical User Interface (GUI)
Command Line Computer Interface
1970’s PersonalCommand Line Interface Only
(Sometimes called Shell Or Console)
![Page 8: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/8.jpg)
Python Uses A Command Line Interface?
![Page 9: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/9.jpg)
ARM Cortex-A53 CPU
How Does Programming Work?
![Page 10: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/10.jpg)
Hardware Specific, Very Fast But Very Difficult For Human
Comprehension. This Is The Language That The Computer Speaks.
ARM Cortex-A53 CPU
How Does Programming Work?
![Page 11: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/11.jpg)
How Does Programming Work?
ARM Cortex-A53 CPU
![Page 12: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/12.jpg)
Hardware Specific, Very Fast And Somewhat Comprehendible For People.
ARM Cortex-A53 CPU
How Does Programming Work?
![Page 13: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/13.jpg)
ARM Cortex-A53 CPU
How Does Programming Work?
![Page 14: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/14.jpg)
High Level Languages Are Considered Cross Platform and Comprehendible. To Maintain Speed They Compile An
Assembly Or Machine Language Version Of The Code Specifically
For The CPU.
ARM Cortex-A53 CPU
Quality Compilers Can Generate Quicker CodeC Often Used In Graphics and Operating Systems
How Does Programming Work?
![Page 15: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/15.jpg)
ARM Cortex-A53 CPU
Quality Compilers Can Generate Quicker CodeC Often Used In Graphics and Operating Systems
How Does Programming Work?
![Page 16: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/16.jpg)
ARM Cortex-A53 CPU
PYTHON BASIC
Dynamic high-level general-purpose scripting languages (such as Python and PERL) execute programs in real time using pre-compiled API’s or machine code. Their advantage is that programs can be be constructed from pre built blocks and combined into complex programs.
PERL
Software Intermediary
How Does Programming Work?
![Page 17: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/17.jpg)
How Does Programming Work?
ARM Cortex-A53 CPU - Linux
PYTHON CODE
Python Virtual Machine
Bytecode
![Page 18: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/18.jpg)
How Does Programming Work?PYTHON CODE
ARM Cortex-A53 CPU - Linux
Python Virtual Machine
AMD Athlon™ X4 CPU - Windows
Python Virtual Machine
Intel® Core™ i7 CPU - MAC OSX
Python Virtual Machine
![Page 19: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/19.jpg)
Hello world! In Machine Code
Why Python?
![Page 20: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/20.jpg)
Why Python?
Hello world! In Assembly Language
![Page 21: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/21.jpg)
Why Python?
Hello world! In BASIC, C and Python
![Page 22: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/22.jpg)
Why Python?● Python Is A General Purpose Language
○ Many computer devices○ Libraries for most applications.
● Large Standard Code Library○ Standard Library runs on Raspberry Pi or CRAY Supercomputer.
● Can Be Compiled To Machine Language○ Cython compiles Python code To C.
● Can Call C Code○ Python ctypes
● Clean code○ Employs indentation○ No {..code in here..} or <div>..or stuff in here..<\div>
● Libraries, Libraries, Libraries○ The secret power of Python○ 67,000 libraries (Jan 1, 2016)
![Page 23: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/23.jpg)
Getting Started On Raspberry Pi● https://www.raspberrypi.org/documentation/usage/python/
○ RUNNING PYTHON ON A RASPBERRY PI○ INDENTATION○ VARIABLES○ COMMENTS○ LISTS○ ITERATION and RANGE○ CREATING/SAVING PYTHON FILES○ EXECUTING PYTHON FILES
![Page 24: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/24.jpg)
Python Interactive Mode
Python ShellCommand Line Interface
Python Prompt>>>
Getting Started On Raspberry Pi
![Page 25: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/25.jpg)
Python Interactive Mode
Getting Started On Raspberry Pi
![Page 26: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/26.jpg)
Getting Started On Raspberry Pi
Python Interactive Mode
![Page 27: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/27.jpg)
Getting Started On Raspberry Pi
Python Run Module
![Page 28: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/28.jpg)
Getting Started On Raspberry Pi
Python Run Module
![Page 29: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/29.jpg)
Getting Started On Raspberry Pi
Python Run Module
![Page 30: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/30.jpg)
Getting Started On Raspberry Pi
Python Run Module
![Page 31: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/31.jpg)
CODE
https://trinket.io
Programming In Python - Overview
![Page 32: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/32.jpg)
CODERESULT
(CONSOLE OUTPUT)
https://trinket.io
Programming In Python - Overview
![Page 40: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/40.jpg)
• Python runs as a minimum with always available “built-in libraries”.
• Libraries provide the code functionality
Python Built-In Libraries
![Page 41: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/41.jpg)
https://trinket.io/python/df57cd9d6f
Python Import Standard Libraries
![Page 42: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/42.jpg)
https://trinket.io/python/df57cd9d6f
Python Import Standard Libraries
![Page 43: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/43.jpg)
Python Object Oriented Code
![Page 44: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/44.jpg)
OBJECT
Python Object Oriented Code
![Page 45: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/45.jpg)
OBJECT PROPERTIES
Python Object Oriented Code
![Page 46: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/46.jpg)
Python Object Oriented Code
![Page 47: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/47.jpg)
https://trinket.io/python/a9a6112ca5
Python Object Oriented Code
![Page 48: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/48.jpg)
https://trinket.io/python/d4e0f1f07d
Python Object Oriented Code
![Page 49: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/49.jpg)
Python “Clean” Code
![Page 50: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/50.jpg)
Python “Clean” Code
Indentation and levels used as
separators in code. No curly
braces or containers.
![Page 51: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/51.jpg)
Python “Clean” CodeMinimal use of colons, semi-colons, etc.
![Page 52: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/52.jpg)
External Libraries - Wikipedia
The Beatles Wikipedia Page
![Page 53: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/53.jpg)
External Libraries - Wikipedia
Packages Located In The Python Package Index (PyPI)
![Page 54: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/54.jpg)
External Libraries - Wikipedia
Use Raspberry Pi Terminal To Install External Libraries Using PIP
![Page 55: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/55.jpg)
External Libraries - Wikipedia
“sudo pip install wikipedia” In Terminal Installs The Python Wikipedia Library On Your Raspberry Pi
![Page 56: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/56.jpg)
External Libraries - Wikipedia
Estimated 67,000 Libraries (Jan 1, 2016)
![Page 57: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/57.jpg)
Review
![Page 58: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/58.jpg)
ReviewPYTHON CODE
ARM Cortex-A53 CPU - Linux
Python Virtual Machine
AMD Athlon™ X4 CPU - Windows
Python Virtual Machine
Intel® Core™ i7 CPU - MAC OSX
Python Virtual Machine
![Page 59: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/59.jpg)
Review
![Page 60: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/60.jpg)
Review
![Page 61: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/61.jpg)
Review
![Page 62: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/62.jpg)
Review
![Page 63: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/63.jpg)
Review
![Page 64: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/64.jpg)
Review
![Page 65: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/65.jpg)
Review
![Page 66: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/66.jpg)
Review
![Page 67: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/67.jpg)
Review
![Page 68: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/68.jpg)
Review
![Page 69: Pi Is For Python](https://reader035.vdocument.in/reader035/viewer/2022070513/5884a5101a28ab76798b4935/html5/thumbnails/69.jpg)
Contact