Se ha denunciado esta presentación.
Se está descargando tu SlideShare. ×
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Próximo SlideShare
Raspberry Pi Using Python
Raspberry Pi Using Python
Cargando en…3
×

Eche un vistazo a continuación

1 de 69 Anuncio

Pi Is For Python

Descargar para leer sin conexión

Presentation on basics of computer programming and programming Raspberry Pi's using the Python Programming Language at the Raspberry Pi Demo Day at Toronto Reference Library on May 28, 2016.

Presentation on basics of computer programming and programming Raspberry Pi's using the Python Programming Language at the Raspberry Pi Demo Day at Toronto Reference Library on May 28, 2016.

Anuncio
Anuncio

Más Contenido Relacionado

Presentaciones para usted (20)

Anuncio

Similares a Pi Is For Python (20)

Anuncio

Más reciente (20)

Pi Is For Python

  1. 1. Pi Is For… Programming In Raspberry
  2. 2. Computers Don’t Do Anything Without Instructions
  3. 3. Programming, or Coding, is how we tell computers what to do using instructions that the computer understands.
  4. 4. What Is A Computer Interface?
  5. 5. Jacquard Loom Interface - 1801
  6. 6. Switch Computer Interface - ENIAC 1945
  7. 7. 1950’s - 1960’s Business No Command Line Interface 1990’s Personal Graphical User Interface (GUI) Command Line Computer Interface 1970’s Personal Command Line Interface Only (Sometimes called Shell Or Console)
  8. 8. Python Uses A Command Line Interface?
  9. 9. ARM Cortex-A53 CPU How Does Programming Work?
  10. 10. 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?
  11. 11. How Does Programming Work? ARM Cortex-A53 CPU
  12. 12. Hardware Specific, Very Fast And Somewhat Comprehendible For People. ARM Cortex-A53 CPU How Does Programming Work?
  13. 13. ARM Cortex-A53 CPU How Does Programming Work?
  14. 14. 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 Code C Often Used In Graphics and Operating Systems How Does Programming Work?
  15. 15. ARM Cortex-A53 CPU Quality Compilers Can Generate Quicker Code C Often Used In Graphics and Operating Systems How Does Programming Work?
  16. 16. 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?
  17. 17. How Does Programming Work? ARM Cortex-A53 CPU - Linux PYTHON CODE Python Virtual Machine Bytecode
  18. 18. 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
  19. 19. Hello world! In Machine Code Why Python?
  20. 20. Why Python? Hello world! In Assembly Language
  21. 21. Why Python? Hello world! In BASIC, C and Python
  22. 22. 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)
  23. 23. 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
  24. 24. Python Interactive Mode Python Shell Command Line Interface Python Prompt >>> Getting Started On Raspberry Pi
  25. 25. Python Interactive Mode Getting Started On Raspberry Pi
  26. 26. Getting Started On Raspberry Pi Python Interactive Mode
  27. 27. Getting Started On Raspberry Pi Python Run Module
  28. 28. Getting Started On Raspberry Pi Python Run Module
  29. 29. Getting Started On Raspberry Pi Python Run Module
  30. 30. Getting Started On Raspberry Pi Python Run Module
  31. 31. CODE https://trinket.io Programming In Python - Overview
  32. 32. CODE RESULT (CONSOLE OUTPUT) https://trinket.io Programming In Python - Overview
  33. 33. https://trinket.io/python/81bea2e14c Python Sequence Code
  34. 34. https://trinket.io/python/81bea2e14c Python Sequence Code
  35. 35. https://trinket.io/python/883c20b4a3 Python Functions Code
  36. 36. https://trinket.io/python/883c20b4a3 Python Functions Code
  37. 37. https://trinket.io/python/883c20b4a3 Python Functions Code
  38. 38. https://trinket.io/python/81bea2e14c Python Functions Code
  39. 39. https://trinket.io/python/883c20b4a3 Python Functions Code
  40. 40. • Python runs as a minimum with always available “built-in libraries”. • Libraries provide the code functionality Python Built-In Libraries
  41. 41. https://trinket.io/python/df57cd9d6f Python Import Standard Libraries
  42. 42. https://trinket.io/python/df57cd9d6f Python Import Standard Libraries
  43. 43. Python Object Oriented Code
  44. 44. OBJECT Python Object Oriented Code
  45. 45. OBJECT PROPERTIES Python Object Oriented Code
  46. 46. Python Object Oriented Code
  47. 47. https://trinket.io/python/a9a6112ca5 Python Object Oriented Code
  48. 48. https://trinket.io/python/d4e0f1f07d Python Object Oriented Code
  49. 49. Python “Clean” Code
  50. 50. Python “Clean” Code Indentation and levels used as separators in code. No curly braces or containers.
  51. 51. Python “Clean” Code Minimal use of colons, semi- colons, etc.
  52. 52. External Libraries - Wikipedia The Beatles Wikipedia Page
  53. 53. External Libraries - Wikipedia Packages Located In The Python Package Index (PyPI)
  54. 54. External Libraries - Wikipedia Use Raspberry Pi Terminal To Install External Libraries Using PIP
  55. 55. External Libraries - Wikipedia “sudo pip install wikipedia” In Terminal Installs The Python Wikipedia Library On Your Raspberry Pi
  56. 56. External Libraries - Wikipedia Estimated 67,000 Libraries (Jan 1, 2016)
  57. 57. Review
  58. 58. Review 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
  59. 59. Review
  60. 60. Review
  61. 61. Review
  62. 62. Review
  63. 63. Review
  64. 64. Review
  65. 65. Review
  66. 66. Review
  67. 67. Review
  68. 68. Review
  69. 69. Contact

×