How to python
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

How to python

on

  • 2,028 views

 

Statistics

Views

Total Views
2,028
Views on SlideShare
1,824
Embed Views
204

Actions

Likes
4
Downloads
63
Comments
0

5 Embeds 204

http://med7at.wordpress.com 184
http://helloworld.atihow.com 8
http://www.linkedin.com 7
https://www.linkedin.com 3
https://med7at.wordpress.com 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

How to python Presentation Transcript

  • 1. How To Python*
    Medhat dawoud
    Software Junior Developer
    medhatdawoud@gmail.com
    http://med7at.wordpress.com
    * Program with python
    October 12,2010
    1
  • 2. Python?
    Father Guido Van Rossum
    Birth-year
    1989
    Born at
    Amsterdam
    October 12,2010
    2
  • 3. Python’s Father 
    Guido Van Rossum
    is Netherlands, who write the python programming language as a successor to the ABC programming language, in his week ends , and call it python Relative to the a British television comedy sketch on the BBC…
    Called “Monty Python's Flying Circus”
    October 12,2010
    3
  • 4. Python?
    Platform independent
    Interpreter Language
    Script Language
    Supports OOP
    Object Oriented Programming
    October 12,2010
    4
  • 5. Why Python ?
    Easy Syntax
    Easy Grammar
    Easy Data Structure
    Many Packages
    Very Readable
    Very Flexible
    Usually Short Code
    Easy to Manage Code
    Easy to Work Together
    October 12,2010
    5
  • 6. Get Python!
    On Windows
    http://www.python.org
    DOWNLOAD
    Recommended Version 2.5.X <=
    October 12,2010
    6
  • 7. Get Python!
    On Debian Linux
    ~# apt-get install python
    ~$ sudo apt-get install python
    October 12,2010
    7
  • 8. Run Python!
    ~$ python
    October 12,2010
    8
  • 9. Run Python!
    ~# apt-get install ipython
    ~# ipython
    October 12,2010
    9
  • 10. Python Syntax
    Use python as simple calculator
    >>> 1 + 2
    >>> 6 * 8
    >>> 6.0 * 8
    >>> 2 ^ 10
    >>> 2 ** 10
    >>> _ / 2
    >>> __ / 4
    >>> _
    October 12,2010
    10
  • 11. Python Syntax
    Print the “Hello world!”
    >>> print “Hello World!”
    >>> print(“Hello World!”)
    October 12,2010
    11
  • 12. Python Syntax
    Multiline Text
    Single Quote
    INDENTATION!!
    October 12,2010
    12
  • 13. Python Syntax
    Indentation is also Syntax!!!
    October 12,2010
    13
  • 14. Python Syntax
    You MUST keep the same indentation!
    October 12,2010
    14
  • 15. Python Variables
    But you don’t have to care!
    October 12,2010
    15
  • 16. Python Variables
    Dynamic Typing
    October 12,2010
    16
  • 17. Python Controls
    if
    for
    while
    try, except
    October 12,2010
    17
  • 18. if
    “a is three”
    October 12,2010
    18
  • 19. for
    October 12,2010
    19
  • 20. While
    October 12,2010
    20
  • 21. Try, Except
    October 12,2010
    21
  • 22. Number
    7
    0
    7.0
    0.75
    5+5j
    October 12,2010
    22
  • 23. String
    October 12,2010
    23
  • 24. String
    October 12,2010
    24
  • 25. List, Tuple
    October 12,2010
    25
  • 26. List, Tuple
    October 12,2010
    26
  • 27. Dictionary
    October 12,2010
    27
  • 28. Dictionary
    October 12,2010
    28
  • 29. Dictionary
    October 12,2010
    29
  • 30. Simple input
    October 12,2010
    30
  • 31. Do It Yourself #1
    Your program should do the following
    1. Calculate the 224
    2. Save the result to “result”
    3. Print the “result”
    October 12,2010
    31
  • 32. Do It Yourself #2
    Your program should do the following
    1. Print out the even numbers between 1 to 1000, without line breaks
    2. Print out the 1000 / n When n is between -100 to 100
    October 12,2010
    32
  • 33. Do It Yourself #3
    Your program should do the following
    1. Let given=“we are so friend!”
    2. Using slicing, concatenating, indexing, and methods, make following result
    - “we are friend!”
    - “are WE so friend”
    - “so friend we are”
    October 12,2010
    33
  • 34. Do It Yourself #4
    Your program should do the following
    1. Let given=range(100)
    2. Using the given, get the following
    - Even number between 0~99
    - Odd number between 0~99
    - Multiplier of 3 between 0~50, 70~99
    - List starts from 99 and ends at 1
    October 12,2010
    34
  • 35. Do It Yourself #5
    Your program should do the following
    1. Get the input Name and Age
    2. Save the Name and Age to dictionary
    3. If input is empty Change the input mode to search4. On search mode Print the age of given name
    October 12,2010
    35
  • 36. Summary
    Now you know…
    How to Install and Run Python
    How to Use Python as Calculator
    Basic Python Syntax
    (indentation, quote, multiline text…)
    Python Data Structure
    (string, number, list, dictionary, tuple…)
    Basic Input, Output to the terminal
    (input, raw_input, print)
    October 12,2010
    36
  • 37. You have just learned
    of python!
    October 12,2010
    37
    50%
  • 38. Warning:Sorry to say that You Still CanNot
    Program with Python Under Linux.
    Treating with files.
    Dealing with Modules and functions.
    Connect to a database .
    Treat with XML throw Python.
    Make Interaction GUI Applications.
    Make a Networking Applications.
    Making a Web Applications.
    October 12,2010
    38
  • 39. October 12,2010
    39
    All these Contents Will be Covered in Details in The Full Course
    ISA
    If you wish .. Contact customer services

  • 40. October 12,2010
    40
    The End
  • 41. October 12,2010
    41
    Thanks