+ All Categories
Home > Technology > Python at a glance

Python at a glance

Date post: 26-Jun-2015
Category:
Upload: mohammad-rafiee
View: 356 times
Download: 3 times
Share this document with a friend
Description:
these slides as the title says describes the Python programming language at a glance, they are prepared for Karaj Azad university FOSS symposium workshop.
Popular Tags:
19
Transcript
Page 1: Python at a glance
Page 2: Python at a glance

2

Which Python?

In military

In media & films

In nature

In computers

In ancient Greek

Page 3: Python at a glance

3

The programming language since 1991

Page 4: Python at a glance

4

Monty PythonGuido van Rossum

Wow... What a name, I like it!

Page 5: Python at a glance

5

Market Share

Page 6: Python at a glance

6

Contributions on Github

Page 7: Python at a glance

7

Python

● Is a scripting language● Files extensions are py & pyc● Case sensitive● Is by default clean● Needs minimum programming requirements● Supports in multiple platforms and OSs

Page 8: Python at a glance

8

Online tutorials can be found at

Page 9: Python at a glance

9

Installation

http://www.python.org/getit/

In Linux can be downloaded from repositories too.

Page 10: Python at a glance

10

1. Data types0. Variables2. Strings 3. Comments

5. Arithmetic operations 6. Conditional statements

8. Loop statements7. Functions

9. Classes

4. Lists/Dictionaries

Page 11: Python at a glance

11

Cheat sheets

http://sleet.aos.wisc.edu/~gpetty/wp/wp-content/uploads/2011/10/Python_qr.pdf

http://www.cogsci.rpi.edu/~destem/gamedev/python.pdf

Page 12: Python at a glance

12

Class Scenario:

Create a simple game which gets the number and checks if it is greater of less than the internal

random number if users can find it in 5 attempts they win else they will lose.

Notice : using classes

Page 13: Python at a glance

13

Class Scenario:

The Fibonacci function using recursive and dynamic programming functions.

Notice: using classes

Page 14: Python at a glance

14

Simple Network Programming

1. importing socket library2. creating a socket object

3. connecting to an address/port4. sending/receiving message

5. closing connection6. in server waiting for connections

Page 15: Python at a glance

15

Clients

Page 16: Python at a glance

16

Server

Page 17: Python at a glance

17

Class Scenario:

Create a client application which gets a message from standard input and send it to the server, server ip should be entered by user and the

process should be logged in system.

Notice: using socket library

Page 18: Python at a glance

18

Some Python Frameworks


Recommended