Why Learn Python?

15,556 views

Published on

A intro to the Python programming language and why you should use it, with comparisons and applications of use.

Published in: Technology, Education
1 Comment
12 Likes
Statistics
Notes
No Downloads
Views
Total views
15,556
On SlideShare
0
From Embeds
0
Number of Embeds
302
Actions
Shares
0
Downloads
174
Comments
1
Likes
12
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Why Learn Python?

    1. 1. Why Learn Python?Intro by Christine Cheung
    2. 2. Programming
    3. 3. ProgrammingHow many of you have programmed before?
    4. 4. ProgrammingHow many of you have programmed before?What is the purpose?
    5. 5. ProgrammingHow many of you have programmed before?What is the purpose? Make - create an app
    6. 6. ProgrammingHow many of you have programmed before?What is the purpose? Make - create an app Break - edit an app
    7. 7. ProgrammingHow many of you have programmed before?What is the purpose? Make - create an app Break - edit an app Understand - how or why does it work?
    8. 8. Okay cool, but whyPython?
    9. 9. Okay cool, but whyPython?Make - simple to get started
    10. 10. Okay cool, but whyPython?Make - simple to get startedBreak - easy to read and edit code
    11. 11. Okay cool, but whyPython?Make - simple to get startedBreak - easy to read and edit codeUnderstand - modular and abstracted
    12. 12. Show me the Money
    13. 13. Show me the MoneyIT Salaries are up
    14. 14. Show me the MoneyIT Salaries are up Python is 4th top growing skill in past 3 months
    15. 15. Show me the MoneyIT Salaries are up Python is 4th top growing skill in past 3 monthsAverage starting Python programmer salary
    16. 16. Show me the MoneyIT Salaries are up Python is 4th top growing skill in past 3 monthsAverage starting Python programmer salary 70k+
    17. 17. Show me the Money IT Salaries are up Python is 4th top growing skill in past 3 months Average starting Python programmer salary 70k+Sources:- http://www.readwriteweb.com/enterprise/2011/05/it-hiring-and-salaries-up---wh.php- http://www.payscale.com/research/US/Skill=Python/Salary
    18. 18. History + Facts
    19. 19. History + FactsCreated by Guido van Rossum in late 80s
    20. 20. History + FactsCreated by Guido van Rossum in late 80s “Benevolent Dictator for Life” now at Google
    21. 21. History + FactsCreated by Guido van Rossum in late 80s “Benevolent Dictator for Life” now at GoogleFun and Playful
    22. 22. History + FactsCreated by Guido van Rossum in late 80s “Benevolent Dictator for Life” now at GoogleFun and Playful Name is based off Monty Python
    23. 23. History + FactsCreated by Guido van Rossum in late 80s “Benevolent Dictator for Life” now at GoogleFun and Playful Name is based off Monty Python Spam and Eggs!
    24. 24. Strengths
    25. 25. Strengths Easy for beginners
    26. 26. Strengths Easy for beginners ...but powerful enough for professionals
    27. 27. Strengths Easy for beginners ...but powerful enough for professionals Clean and elegant code
    28. 28. Strengths Easy for beginners ...but powerful enough for professionals Clean and elegant code whitespace enforcement
    29. 29. Strengths Easy for beginners ...but powerful enough for professionals Clean and elegant code whitespace enforcement Many modules and libraries to import from
    30. 30. Strengths Easy for beginners ...but powerful enough for professionals Clean and elegant code whitespace enforcement Many modules and libraries to import from Cross platform - Windows, Mac, Linux
    31. 31. Strengths Easy for beginners ...but powerful enough for professionals Clean and elegant code whitespace enforcement Many modules and libraries to import from Cross platform - Windows, Mac, Linux Supportive, large, and helpful community
    32. 32. BASIC
    33. 33. BASIC10 INPUT A20 INPUT B30 C=A+B40 PRINT CRUN
    34. 34. C
    35. 35. C#include <stdio.h>int main(int argc, char*argv[]){ int a,b,c; scanf("%d",&a); scanf("%d",&b); c = a+b; printf("%dn",c);}$ gcc -o add add.c$ ./add
    36. 36. C#include <stdio.h>int main(int argc, char*argv[]){ int a,b,c; standard input/output scanf("%d",&a); scanf("%d",&b); c = a+b; printf("%dn",c);}$ gcc -o add add.c$ ./add
    37. 37. C#include <stdio.h>int main(int argc, char*argv[]){ int a,b,c; standard input/output scanf("%d",&a); scanf("%d",&b); return types c = a+b; printf("%dn",c);}$ gcc -o add add.c$ ./add
    38. 38. C#include <stdio.h>int main(int argc, char*argv[]){ int a,b,c; standard input/output scanf("%d",&a); scanf("%d",&b); return types c = a+b; scanf limitations printf("%dn",c);}$ gcc -o add add.c$ ./add
    39. 39. C#include <stdio.h>int main(int argc, char*argv[]){ int a,b,c; standard input/output scanf("%d",&a); scanf("%d",&b); return types c = a+b; scanf limitations printf("%dn",c); compiling}$ gcc -o add add.c$ ./add
    40. 40. C#include <stdio.h>int main(int argc, char*argv[]){ int a,b,c; standard input/output scanf("%d",&a); scanf("%d",&b); return types c = a+b; scanf limitations printf("%dn",c); compiling} ...and not to mention memory$ gcc -o add add.c allocation, pointers, variable types...$ ./add
    41. 41. Java
    42. 42. Javaimport java.io.*;public class Addup{ static public void main(String args[]) { InputStreamReader stdin = new InputStreamReader(System.in); BufferedReader console = new BufferedReader(stdin); int i1 = 0,i2 = 0; String s1,s2; try { s1 = console.readLine(); i1 = Integer.parseInt(s1); s2 = console.readLine(); i2 = Integer.parseInt(s2); } catch(IOException ioex) { System.out.println("Input error"); System.exit(1); } catch(NumberFormatException nfex) { System.out.println(""" + nfex.getMessage() + "" is notnumeric"); System.exit(1); } System.out.println(i1 + " + " + i2 + " = " + (i1+i2)); System.exit(0); }}$ javac Addup.java$ java Addup
    43. 43. Javaimport java.io.*;public class Addup{ classes, arguments static public void main(String args[]) { InputStreamReader stdin = new InputStreamReader(System.in); BufferedReader console = new BufferedReader(stdin); int i1 = 0,i2 = 0; String s1,s2; try { s1 = console.readLine(); i1 = Integer.parseInt(s1); s2 = console.readLine(); i2 = Integer.parseInt(s2); } catch(IOException ioex) { System.out.println("Input error"); System.exit(1); } catch(NumberFormatException nfex) { System.out.println(""" + nfex.getMessage() + "" is notnumeric"); System.exit(1); } System.out.println(i1 + " + " + i2 + " = " + (i1+i2)); System.exit(0); }}$ javac Addup.java$ java Addup
    44. 44. Javaimport java.io.*;public class Addup{ classes, arguments static public void main(String args[]) { InputStreamReader stdin = new InputStreamReader(System.in); BufferedReader console = new BufferedReader(stdin); int i1 = 0,i2 = 0; input stream, buffer String s1,s2; try { s1 = console.readLine(); i1 = Integer.parseInt(s1); s2 = console.readLine(); i2 = Integer.parseInt(s2); } catch(IOException ioex) { System.out.println("Input error"); System.exit(1); } catch(NumberFormatException nfex) { System.out.println(""" + nfex.getMessage() + "" is notnumeric"); System.exit(1); } System.out.println(i1 + " + " + i2 + " = " + (i1+i2)); System.exit(0); }}$ javac Addup.java$ java Addup
    45. 45. Javaimport java.io.*;public class Addup{ classes, arguments static public void main(String args[]) { InputStreamReader stdin = new InputStreamReader(System.in); BufferedReader console = new BufferedReader(stdin); int i1 = 0,i2 = 0; input stream, buffer String s1,s2; try { s1 = console.readLine(); variable types i1 = Integer.parseInt(s1); s2 = console.readLine(); i2 = Integer.parseInt(s2); } catch(IOException ioex) { System.out.println("Input error"); System.exit(1); } catch(NumberFormatException nfex) { System.out.println(""" + nfex.getMessage() + "" is notnumeric"); System.exit(1); } System.out.println(i1 + " + " + i2 + " = " + (i1+i2)); System.exit(0); }}$ javac Addup.java$ java Addup
    46. 46. Javaimport java.io.*;public class Addup{ classes, arguments static public void main(String args[]) { InputStreamReader stdin = new InputStreamReader(System.in); BufferedReader console = new BufferedReader(stdin); int i1 = 0,i2 = 0; input stream, buffer String s1,s2; try { s1 = console.readLine(); variable types i1 = Integer.parseInt(s1); s2 = console.readLine(); i2 = Integer.parseInt(s2); try, catch, exceptions } catch(IOException ioex) { System.out.println("Input error"); System.exit(1); } catch(NumberFormatException nfex) { System.out.println(""" + nfex.getMessage() + "" is notnumeric"); System.exit(1); } System.out.println(i1 + " + " + i2 + " = " + (i1+i2)); System.exit(0); }}$ javac Addup.java$ java Addup
    47. 47. Javaimport java.io.*;public class Addup{ classes, arguments static public void main(String args[]) { InputStreamReader stdin = new InputStreamReader(System.in); BufferedReader console = new BufferedReader(stdin); int i1 = 0,i2 = 0; input stream, buffer String s1,s2; try { s1 = console.readLine(); variable types i1 = Integer.parseInt(s1); s2 = console.readLine(); i2 = Integer.parseInt(s2); try, catch, exceptions } catch(IOException ioex) { System.out.println("Input error"); system.out System.exit(1); } catch(NumberFormatException nfex) { System.out.println(""" + nfex.getMessage() + "" is notnumeric"); System.exit(1); } System.out.println(i1 + " + " + i2 + " = " + (i1+i2)); System.exit(0); }}$ javac Addup.java$ java Addup
    48. 48. Javaimport java.io.*;public class Addup{ classes, arguments static public void main(String args[]) { InputStreamReader stdin = new InputStreamReader(System.in); BufferedReader console = new BufferedReader(stdin); int i1 = 0,i2 = 0; input stream, buffer String s1,s2; try { s1 = console.readLine(); variable types i1 = Integer.parseInt(s1); s2 = console.readLine(); i2 = Integer.parseInt(s2); try, catch, exceptions } catch(IOException ioex) { System.out.println("Input error"); system.out System.exit(1); } catch(NumberFormatException nfex) { System.out.println(""" + nfex.getMessage() + "" is not compilingnumeric"); System.exit(1); } System.out.println(i1 + " + " + i2 + " = " + (i1+i2)); System.exit(0); }}$ javac Addup.java$ java Addup
    49. 49. Javaimport java.io.*;public class Addup{ classes, arguments static public void main(String args[]) { InputStreamReader stdin = new InputStreamReader(System.in); BufferedReader console = new BufferedReader(stdin); int i1 = 0,i2 = 0; input stream, buffer String s1,s2; try { s1 = console.readLine(); variable types i1 = Integer.parseInt(s1); s2 = console.readLine(); i2 = Integer.parseInt(s2); try, catch, exceptions } catch(IOException ioex) { System.out.println("Input error"); system.out System.exit(1); } catch(NumberFormatException nfex) { System.out.println(""" + nfex.getMessage() + "" is not compilingnumeric"); System.exit(1); } however, at least you don’t System.out.println(i1 + " + " + i2 + " = " + (i1+i2)); System.exit(0); have to deal with garbage } collection... :)}$ javac Addup.java$ java Addup
    50. 50. Python
    51. 51. Pythona = input()b = input()c = a + bprint c$ python add.py
    52. 52. More Tech TalkingPoints
    53. 53. More Tech TalkingPointsIndentation enforces good programming style
    54. 54. More Tech TalkingPointsIndentation enforces good programming style can read other’s code, and not obfuscated
    55. 55. More Tech TalkingPointsIndentation enforces good programming style can read other’s code, and not obfuscated sub b{$n=99-@_-$_||No;"$n bottle"."s"x!!--$n." of beer"};$w=" on the wall"; die map{b."$w,n".b.",nTake one down, pass it around, n".b(0)."$w.nn"}0..98
    56. 56. More Tech TalkingPointsIndentation enforces good programming style can read other’s code, and not obfuscated sub b{$n=99-@_-$_||No;"$n bottle"."s"x!!--$n." of beer"};$w=" on the wall"; die map{b."$w,n".b.",nTake one down, pass it around, n".b(0)."$w.nn"}0..98 No more forgotten braces and semi-colons! (less debug time)
    57. 57. More Tech TalkingPointsIndentation enforces good programming style can read other’s code, and not obfuscated sub b{$n=99-@_-$_||No;"$n bottle"."s"x!!--$n." of beer"};$w=" on the wall"; die map{b."$w,n".b.",nTake one down, pass it around, n".b(0)."$w.nn"}0..98 No more forgotten braces and semi-colons! (less debug time)Safe - dynamic run time type checking and bounds checking on arrays
    58. 58. More Tech Talking Points Indentation enforces good programming style can read other’s code, and not obfuscated sub b{$n=99-@_-$_||No;"$n bottle"."s"x!!--$n." of beer"};$w=" on the wall"; die map{b."$w,n".b.",nTake one down, pass it around, n".b(0)."$w.nn"}0..98 No more forgotten braces and semi-colons! (less debug time) Safe - dynamic run time type checking and bounds checking on arraysSourcehttp://www.ariel.com.au/a/teaching-programming.html
    59. 59. Scripting and what else?
    60. 60. Scripting and what else?Application GUI Programming
    61. 61. Scripting and what else?Application GUI Programming Gtk, Qt, Tk, WxWidgets, and MANY more...
    62. 62. Scripting and what else?Application GUI Programming Gtk, Qt, Tk, WxWidgets, and MANY more... IronPython (.NET), Jython (Java)
    63. 63. Scripting and what else?Application GUI Programming Gtk, Qt, Tk, WxWidgets, and MANY more... IronPython (.NET), Jython (Java)Web Frameworks
    64. 64. Scripting and what else?Application GUI Programming Gtk, Qt, Tk, WxWidgets, and MANY more... IronPython (.NET), Jython (Java)Web Frameworks Django, Pylons, TurboGears, Zope, ...
    65. 65. Scripting and what else?Application GUI Programming Gtk, Qt, Tk, WxWidgets, and MANY more... IronPython (.NET), Jython (Java)Web Frameworks Django, Pylons, TurboGears, Zope, ...Hardware
    66. 66. Scripting and what else?Application GUI Programming Gtk, Qt, Tk, WxWidgets, and MANY more... IronPython (.NET), Jython (Java)Web Frameworks Django, Pylons, TurboGears, Zope, ...Hardware Arduino interface, pySerial
    67. 67. Is it really that perfect?
    68. 68. Is it really that perfect?Interpreted language
    69. 69. Is it really that perfect?Interpreted language slight overhead
    70. 70. Is it really that perfect?Interpreted language slight overhead dynamic typing
    71. 71. Is it really that perfect?Interpreted language slight overhead dynamic typingComplex systems (compute bound)
    72. 72. Is it really that perfect?Interpreted language slight overhead dynamic typingComplex systems (compute bound)Limited systems
    73. 73. Is it really that perfect?Interpreted language slight overhead dynamic typingComplex systems (compute bound)Limited systems low level, limited memory on system
    74. 74. Who else uses it?
    75. 75. Who else uses it?
    76. 76. Who else uses it?
    77. 77. Who else uses it?
    78. 78. Who else uses it?
    79. 79. Who else uses it?
    80. 80. Who else uses it?
    81. 81. Who else uses it?
    82. 82. Who else uses it?
    83. 83. Who else uses it?

    ×