Pro Yearly is on sale from $80 to $50! »

Python for Beginners

Python for Beginners

Presentation from my very first PythonExpress workshop at Nirma University, Ahmedabad.

Eecba7761a3f30bef7708a4dd945fd9b?s=128

Daxeel Soni

August 19, 2017
Tweet

Transcript

  1. Python for Beginners 19th August, 2017 Nirma University, Ahmedabad Daxeel

    Soni
  2. Agenda •Coding Bag (Tools) •History •Features •Companies using Python •Programming

    ‣ Variables, data types, operators ‣ Control flow structures ‣ Loops ‣ User defined functions ‣ File operations ‣ Modules ‣ PIP •QnA
  3. About Me •Co-lead at Facebook Developers Circles, Ahmedabad •Coach at

    Django Girls(UK), Ahmedabad Chapter •Hackathon lover. •Selected for Hack the North ’17 hackathon at University of Waterloo, Canada. •HackInOut ’17 1st runner up •In top 100 makers across India for nationwide makers gathering Maker Mela ’17 •Area of work includes APIs, bots, IoT, web. •Building crazy stuffs in python since 2 years. •4th Year engineering student at GTU.
  4. Example •Chatbot controlled CNC machine •Tech stack : raspberry PI,

    arduino, python, openshift cloud •https://devpost.com/software/iot-based-facebook-chatbot-controlled-cnc-machine
  5. Coding Bag (Tools)

  6. History •In 1980 founded by Guido Van Rossum •The name

    python belong to popular TV show “Monty Python’s Flying Circus” •Python 2 is popular version •MIT has enrolled python has their first language.
  7. Features •Interpreted •Interactive •Object-oriented •Easy to learn •Readable beautiful code

    •Open source with strong community •Crossplatform •Large collection of library packages
  8. Who Uses Python?

  9. So, lets do some action!!!

  10. Variables, Data types & Operators •Python IDLE •Don’t need to

    provide data type •int, float, string & boolean •type() •typecasting •single quoted strings (‘ ’) & double quoted strings (“ ”) are same. •Comments •Operators •String multiplication •String concatenation •String indexing •len() •raw_input()
  11. Control flow structures •Terminal setup •No brackets •Indentation concept •Results

    into beautiful code by default •if, else, elif •Python does not support switch case
  12. Loops •while •for •no do-while loops •Nested loops •in keyword

    with collection •range()
  13. Data Structures •tuple - immutable •list - mutable •dictionary •indexing

    and negative indexing •append to list •index() •string splitting •List addition •Dictionary •keys() •values() •items() •Add new key-value pair in dict •looping in DS
  14. User Defined Functions •def •arguments •default arguments •return keyword

  15. File Operations •open(fileName, mode) •modes - w, r, a •close()

  16. Modules •Python package •built-in modules - math(pow, factorial), web browser(open),

    os(getcwd). •Create module •Power of Python - 3rd party modules - beautiful soup, requests, flask, django, pyserial •Python package manager - PIP •PIP installation •pip install MODULE_NAME
  17. QnA