Python novice to ninja

675 views
479 views

Published on

Published in: Technology
1 Comment
3 Likes
Statistics
Notes
No Downloads
Views
Total views
675
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
11
Comments
1
Likes
3
Embeds 0
No embeds

No notes for slide

Python novice to ninja

  1. 1. PYTHON FROM NOVICE TO NINJA. WORKSHOP BY @ALSAYEDGAMAL
  2. 2. WARNING: BEGINNERS ONLY SESSION WELL, IT’S OK TO JOIN IF YOU HAVE NO PYTHON EXPERIENCE.
  3. 3. AGENDA • Motivation. • Python essentials.* • Basic application development.* • Tips and tricks. • Your python track. *= HANDS ON
  4. 4. MOTIVATION WHY PYTHON ?
  5. 5. WHY PYTHON? • It’s Open source. • Cross platform. • Easy to learn. • No boiler plates. • Dynamic
 (to be explained in code). • Community. ?
  6. 6. OPEN SOURCE OPEN SOURCE == FREEDOM.
  7. 7. CROSS PLATFORM WRITE ONCE, RUN EVERYWHERE.
  8. 8. EASY TO LEARN IT TAKES > 10 SECONDS TO WRITE YOUR HELLO, WORLD.
  9. 9. SYSTEM.OUT.PRINT(“HELLO,WORLD”); IT TAKES 1 LINE TO YOUR “HELLO, WORLD”
  10. 10. FROM 29TH TO 8TH IN < 7 YEARS* IT’S 8TH TOO IN 2013. *TOIBE.COM | TIOBE PROGRAMMING COMMUNITY INDEX FOR NOVEMBER 2013
  11. 11. FROM 29TH TO 8TH IN < 7 YEARS* IT’S 8TH TOO IN 2013. *TOIBE.COM | TIOBE PROGRAMMING COMMUNITY INDEX FOR NOVEMBER 2013
  12. 12. “Innovation distinguishes between a leader and a follower.” –Steve Jobs
  13. 13. PYTHON ESSENTIALS • Scripting nature. • Basic data types. • Operators. • Flow control. • Functions are fun. • Modules. • OOP.
  14. 14. EXPRESSION IN PYTHON. variable = 3 + 2 EXPRESSION
  15. 15. EXPRESSION IN PYTHON. OPERATORS variable = 3 + 2 EXPRESSION OPERANDS
  16. 16. EXPRESSION IN PYTHON. OPERATORS variable = 3 + 2 EXPRESSION Data
 5, “hello”, [1,2,3] OPERANDS Variables
 x,name, __len__
  17. 17. EXPRESSION IN PYTHON. OPERATORS + * = / %
 [] () > = & != | variable = 3 + 2 EXPRESSION Data
 5, “hello”, [1,2,3] OPERANDS Variables
 x,name, __len__
  18. 18. PYTHON BLOCKS Branching if condition: If block Function definition def foo(x,y): function body Loop for item in structure: for block Class definition class class_name(parent): class definition
  19. 19. GETTING YOUR HANDS DIRTY TIME TO EXPLAIN IN CODE.
  20. 20. BEFORE WE START • If you are linux or unix based you are good to go. • Else If you are on windows (I hope not) download and install • • • sublime text editor python runtime Our code will be perfect for Python 2.x and may be 3.x.
  21. 21. SORTED?
  22. 22. MEDIA.PY P1: Tawfik Okasha P2: Amr Adib
  23. 23. SCRIPT HIGHLIGHTS. • Basic expression (variable assignment). • User input and output. • Function definition / passing function as variable. • List data-type. • Basic sorting.
  24. 24. NEXT: SHAPING YOUR EXPERIENCE SYSTEM ADMIN, WEB, DESKTOP, NETWORK, GAME DEVELOPMENT,…
  25. 25. QUESTIONS?
  26. 26. THANKS

×