Introduction to Python



Similar documents
Programming in Python. Basic information. Teaching. Administration Organisation Contents of the Course. Jarkko Toivonen. Overview of Python

CS101 Lecture 24: Thinking in Python: Input and Output Variables and Arithmetic. Aaron Stevens 28 March Overview/Questions

A Python Tour: Just a Brief Introduction CS 303e: Elements of Computers and Programming

Postprocessing with Python

Rich Internet Applications

Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming

TOAD and SubVersion - A Quick How To. Norman Dunbar of Dunbar IT Consultants Ltd.

STEP 0: OPEN UP THE PYTHON EDITOR. If python is on your computer already, it's time to get started. On Windows, find IDLE in the start menu.

Kurz-Einführung Python

Introduction to Python

Computational Mathematics with Python

PROGRAMMING FOR BIOLOGISTS. BIOL 6297 Monday, Wednesday 10 am -12 pm

9/11/15. What is Programming? CSCI 209: Software Development. Discussion: What Is Good Software? Characteristics of Good Software?

An Introduction to Computer Science and Computer Organization Comp 150 Fall 2008

Introduction to Python

Computational Mathematics with Python

How to Setup and Connect to an FTP Server Using FileZilla. Part I: Setting up the server

Notepad++ The COMPSCI 101 Text Editor for Windows. What is a text editor? Install Python 3

Introduction to Python

Making Use of Python

Evolution of the Major Programming Languages

Outline. hardware components programming environments. installing Python executing Python code. decimal and binary notations running Sage

A Java Crib Sheet. First: Find the Command Line

Introduction to Python for Text Analysis

MayaVi: A free tool for CFD data visualization

Running your first Linux Program

Turtle Power. Introduction: Python. In this project, you ll learn how to use a turtle to draw awesome shapes and patterns. Activity Checklist

Installing Java. Table of contents

Creating Home Directories for Windows and Macintosh Computers

Introduction. Why (GIS) Programming? Streamline routine/repetitive procedures Implement new algorithms Customize user applications

Version Control with Subversion and Xcode

C# and Other Languages

University of Hull Department of Computer Science. Wrestling with Python Week 01 Playing with Python

Chapter 1: Getting Started

Exploring Algorithms with Python

Chapter 2: Software Development in Python

Manual English KOI Desktop App 2.0.x

1001ICT Introduction To Programming Lecture Notes

Whitepapers at Amikelive.com

Welcome to Introduction to programming in Python

Page 18. Using Software To Make More Money With Surveys. Visit us on the web at:

Iron Speed Designer Installation Guide

Language Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages

Chapter 1. Introduction to ios Development. Objectives: Touch on the history of ios and the devices that support this operating system.

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1

Code Estimation Tools Directions for a Services Engagement

MetaKit: Quick and Easy Storage for your Tcl Application 1

MEAP Edition Manning Early Access Program Hello! ios Development version 14

Introduction to Python

Section 1.4. Java s Magic: Bytecode, Java Virtual Machine, JIT,

A reminder of what we talked about during Lecture 02. }> 1

How to Run Parallel Jobs Efficiently

Chapter 2 Writing Simple Programs

Outlook Plugin. What is MangoApps for Outlook?

How To Create A Multi-Version Bootable Windows 7 USB Drive

by Jonathan Kohl and Paul Rogers 40 BETTER SOFTWARE APRIL

A Sales Strategy to Increase Function Bookings

A Comparison of C, MATLAB, and Python as Teaching Languages in Engineering

Yale Software Library

Student ANGEL FAQs. General Issues: System Requirements:

Chapter 1 Fundamentals of Java Programming

DIY Device Cloud Documentation

The IDL Virtual Machine

Buyer Lead Conversion Plan

Introduction Our choice Example Problem Final slide :-) Python + FEM. Introduction to SFE. Robert Cimrman

Remote Access to Unix Machines

2014 V1.0. LiveText e-portfolios

Assignment 1: Matchismo

Introduction to Eclipse

Welcome to Introduction to Computers and Programming Course using Python

Crash Dive into Python

Android: Setup Hello, World: Android Edition. due by noon ET on Wed 2/22. Ingredients.

Introduction to. Marty Stepp University of Washington

Programming in Access VBA

Google Drive: Access and organize your files

NaviCell Data Visualization Python API

Computational Mathematics with Python

Why move to Free-Form RPG?

CS 103 Lab Linux and Virtual Machines

Management Principles CORPORATE LEARNING COURSE TEAM BUILDING BLOCK SEMINAR 3.4

Downloading YouTube Videos & Storing/Sharing Instructional Video:

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

Practical Programming, 2nd Edition

Chapter 1. Dr. Chris Irwin Davis Phone: (972) Office: ECSS CS-4337 Organization of Programming Languages

Python Basics. S.R. Doty. August 27, Preliminaries What is Python? Installation and documentation... 4

Python and Cython. a dynamic language. installing Cython factorization again. working with numpy

Installing the Android SDK

Customer Education to Combat Scams and Fraud

Programming Languages CIS 443

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

GlueTrack interpreter for S2E beam dynamic simulations. Igor Zagorodnov BDGM, DESY

Installing C++ compiler for CSc212 Data Structures

WinSCP Tutorial 01/28/09: Y. Liow

Transcription:

Introduction to Python Girls Programming Network School of Information Technologies University of Sydney Mini-Lecture 1

Python Install Running Summary 2 Outline 1 What is Python? 2 Installing Python 3 Running Python 4 Summary

Python Install Running Summary 3 There are many different kinds of programming languages Programming languages taught in schools include: ˆ Visual Basic (and Visual Basic.NET) ˆ C# ˆ Java ˆ Python ˆ ColdFusion To run programs written in some of these languages you will need a program called a compiler. The compiler checks that your program is syntactically correct and then creates an executable version that your computer understands.

Python Install Running Summary 4 We are going to learn Python ˆ Python programs do not need to be compiled - instead they are run by the Python interpreter. http://xkcd.com

Python Install Running Summary 5 Python was developed by Guido van Rossum ˆ started over the Christmas break 1989 ˆ developed in the early 1990s ˆ while Guido was at CWI and CNRI ˆ name from Monty Python s Flying Circus ˆ Guido is known as the Benevolent Dictator for Life (bdfl), meaning that he continues to oversee Python s development. http://www.python.org/~guido/

Python Install Running Summary 6 Python inherits from abc ˆ Guido previously worked on abc at CWI in the early 1980s ˆ abc was designed for beginners and non-professionals ˆ abc placed a high value on clarity: ˆ blocks identified by indentation ˆ minimal use of punctuation ˆ one preferred way of doing things ˆ but lacked extensibility and used idiosyncractic syntax and terminology ˆ Python was designed to appeal to the Unix/C community http://www.python.org/doc/essays/foreword/

Python Install Running Summary 7 So why use Python? ˆ the clean simple syntax is very easy to read and write it has been called executable pseudo-code ˆ it encourages good programming habits ˆ it still has a lot of power and features: objects, exceptions, generators, iterators, threads,... ˆ but these don t get in the way of beginners ˆ and a huge standard library (batteries included): re, os, email, urllib, bsddb ˆ Python scripts are portable to anywhere the interpreter runs ˆ and the interpreter is freely available for: Windows 95-XP/CE, Mac (0S 9-X), any Unix, Amiga, JVM,...

Python Install Running Summary 8 Still not convinced? ˆ Python lets you get on with writing interesting programs ˆ Python programming is fun! [Python is] the most efficient language I ve ever used. It s 10 times better than any of the other tools I have used. It s free, it s object-oriented, it adapts to everything, it runs on everything. There is almost an indescribable, quality without a name attraction on my part Bruce Eckel, author of Thinking in C++, Thinking in Java

Python Install Running Summary 9 Lots of big organisations are using Python Python is everywhere at ilm. It s used to extend the capabilities of our applications, as well as providing the glue between them. Every cg image we create has involved Python somewhere in the process. Philip Peterson, Principal Engineer R&D, Industrial Light & Magic. Python has been an important part of Google since the beginning, and remains so as the system grows and evolves. Today dozens of Google engineers use Python, and we re looking for more people with skills in this language. Peter Norvig, Director of Search Quality, Google.

Python Install Running Summary 10 Download Python from the website ˆ run the Windows installer from http://www.python.org ˆ Python 2.5.2 is the latest version (10.8MB)

Python Install Running Summary 11 Installing Python ˆ if possible install Python as user Administrator ˆ it s best to install it in the default C:\Python25 location

Python Install Running Summary 12 Version confusion! ˆ Don t get Python 2.6a ˆ Don t get Python 3.0 (a.k.a. Python 3000) ˆ Python is changing over the next couple of years ˆ Don t worry, you ll be able to learn the new ways of doing things easily. ˆ Use the current stable version (2.5.2) for now!

Python Install Running Summary 13 Running Python ˆ Under Unix/Linux, just type python at the shell prompt ˆ Under Windows, you can run it from a command shell: ˆ goto Start Run, and enter cmd, and press OK. ˆ then type python

Python Install Running Summary 14 Running the Integrated DeveLopment Environment ˆ idle is an ide for Python written in Python ˆ Under Unix/Linux, just type idle at the shell prompt ˆ Under Windows, goto Start Programs Python2.5 and select IDLE (Python GUI):

Python Install Running Summary 15 Hello World is tiny in Python ˆ Hello World is the canonical first program to write ˆ In Python, Hello World is only one line! ˆ You can type it directly into the Python interpreter: 1 >>> print "hello world" 2 hello world 3 >>> ˆ The colours in this (and all examples) matches the syntax highlighting that idle produces.

Python Install Running Summary 16 Hello World in idle

Python Install Running Summary 17 Writing Python in idle ˆ idle is an ide for Python written in Python ˆ Under Unix/Linux, just type idle at the shell prompt ˆ Under Windows, goto Start Programs Python2.5 and select IDLE (Python GUI):

Python Install Running Summary 18 You should now be able to: ˆ Convince everyone to code in Python :) ˆ Install and run the Python interpreter under Windows ˆ Enter simple statements into the interactive Python Shell