Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Python for Beginners

Python for Beginners

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

Daxeel Soni

August 19, 2017
Tweet

More Decks by Daxeel Soni

Other Decks in Programming

Transcript

  1. 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
  2. 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.
  3. Example •Chatbot controlled CNC machine •Tech stack : raspberry PI,

    arduino, python, openshift cloud •https://devpost.com/software/iot-based-facebook-chatbot-controlled-cnc-machine
  4. 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.
  5. Features •Interpreted •Interactive •Object-oriented •Easy to learn •Readable beautiful code

    •Open source with strong community •Crossplatform •Large collection of library packages
  6. 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()
  7. Control flow structures •Terminal setup •No brackets •Indentation concept •Results

    into beautiful code by default •if, else, elif •Python does not support switch case
  8. 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
  9. 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
  10. QnA