Introduction to Python

Similar documents
PYTHON CONTENT NOTE: Almost every task is explained with an example

Python INTRODUCTION: Understanding the Open source Installation of python in Linux/windows. Understanding Interpreters * ipython.

Python Basics. Lecture and Lab 5 Day Course. Python Basics

PTN-102 Python programming

This course is designed for anyone who needs to learn how to write programs in Python.

Course Outline - COMP150. Lectures and Labs

GE PROBLEM SOVING AND PYTHON PROGRAMMING. Question Bank UNIT 1 - ALGORITHMIC PROBLEM SOLVING

Table of Contents. Preface... xxi

Babu Madhav Institute of Information Technology, UTU 2015

About Python. Python Duration. Training Objectives. Training Pre - Requisites & Who Should Learn Python

Python in 10 (50) minutes

Basic Python 3 Programming (Theory & Practical)

Webgurukul Programming Language Course

Al al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department

Introduction to Programming Using Java (98-388)

Python Training. Complete Practical & Real-time Trainings. A Unit of SequelGate Innovative Technologies Pvt. Ltd.

GIS 4653/5653: Spatial Programming and GIS. More Python: Statements, Types, Functions, Modules, Classes

Programming in Python Advanced

Index. object lifetimes, and ownership, use after change by an alias errors, use after drop errors, BTreeMap, 309

[CHAPTER] 1 INTRODUCTION 1

Course Title: Python + Django for Web Application

Flask Web Development Course Catalog

PYTHON TRAINING COURSE CONTENT

Table of Contents EVALUATION COPY

PTN-105 Python programming. Course Outline. Prerequisite: basic Linux/UNIX and programming skills. Delivery Method: Instructor-led training (ILT)

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS

Syllabus & Curriculum for Certificate Course in Java. CALL: , for Queries

Python Scripting for Computational Science

Data Structures (list, dictionary, tuples, sets, strings)

Glossary. For Introduction to Programming Using Python By Y. Daniel Liang

Overview of OOP. Dr. Zhang COSC 1436 Summer, /18/2017

Django with Python Course Catalog

Lotus IT Hub. Module-1: Python Foundation (Mandatory)

Python Scripting for Computational Science

Worksheet 6: Basic Methods Methods The Format Method Formatting Floats Formatting Different Types Formatting Keywords

Data Science with Python Course Catalog

Programming in Python 3

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

Alastair Burt Andreas Eisele Christian Federmann Torsten Marek Ulrich Schäfer. October 6th, Universität des Saarlandes. Introduction to Python

A- Core Java Audience Prerequisites Approach Objectives 1. Introduction

Introduction to Python: Data types. HORT Lecture 8 Instructor: Kranthi Varala

03 Features of C#, Part 2. Jerry Nixon Microsoft Developer Evangelist Daren May President & Co-founder, Crank211

PYTHON. p ykos vtawynivis. Second eciitiovl. CO Ve, WESLEY J. CHUN

WA1278 Introduction to Java Using Eclipse

Python Certification Training

Course Structure of Python Training: UNIT - 1: COMPUTER FUNDAMENTALS. Computer Fundamentals. Installation of Development Tools:

[Course Overview] After completing this module you are ready to: Develop Desktop applications, Networking & Multi-threaded programs in java.

Computer Hardware 6. The

ActiveNET. #202, Manjeeraa Plaza, Ameerpet, HYD

JVA-103. Java Programming

Programming in Python

CERTIFICATE IN WEB PROGRAMMING

C++ (Non for C Programmer) (BT307) 40 Hours

Overview of the Ruby Language. By Ron Haley

Begin to code with Python Obtaining MTA qualification expanded notes

Course Text. Course Description. Course Objectives. StraighterLine Introduction to Programming in C++

Training with Certification

Computer Science (330)

Aim behind client server architecture Characteristics of client and server Types of architectures

Functions, Scope & Arguments. HORT Lecture 12 Instructor: Kranthi Varala

Java 1.8 Programming

Programming in Scala Second Edition

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17

Absolute C++ Walter Savitch

The C# Programming Language. Overview

CSE Lecture 24 Review and Recap. High-Level Overview of the Course!! L1-7: I. Programming Basics!

5/23/2015. Core Java Syllabus. VikRam ShaRma

Week. Lecture Topic day (including assignment/test) 1 st 1 st Introduction to Module 1 st. Practical

L1/L2 NETWORK PROTOCOL TESTING

Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p.


Introduction to C++ Introduction. Structure of a C++ Program. Structure of a C++ Program. C++ widely-used general-purpose programming language

Cosmology with python: Beginner to Advanced in one week. Tiago Batalha de Castro

Other resources from O Reilly

Welcome to MCS 275. Course Content Prerequisites & Expectations. Scripting in Python from OOP to LAMP example: Factorization in Primes

DOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS

F1 A Java program. Ch 1 in PPIJ. Introduction to the course. The computer and its workings The algorithm concept

Unit 2. Srinidhi H Asst Professor

Introduction to Python Part 1. Brian Gregor Research Computing Services Information Services & Technology

Introduction to C++ with content from

Data type built into Python. Dictionaries are sometimes found in other languages as associative memories or associative arrays.

Discover how to get up and running with the Java Development Environment and with the Eclipse IDE to create Java programs.

Python I. Some material adapted from Upenn cmpe391 slides and other sources

Python Tutorial. Day 1


Programming with Python with Software Automation & Data Analytics

Page 1

Oops known as object-oriented programming language system is the main feature of C# which further support the major features of oops including:

DSC 201: Data Analysis & Visualization

C++11 and Compiler Update

(CC)A-NC 2.5 by Randall Munroe Python

Java Programming Training for Experienced Programmers (5 Days)

Java Programming with Eclipse

(800) Toll Free (804) Fax Introduction to Java and Enterprise Java using Eclipse IDE Duration: 5 days

Chapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines.

Introduction to Programming Microsoft.NET Applications with Visual Studio 2008 (C#)

A Byte of Python. Swaroop C H

Programming for Data Science Syllabus

And Parallelism. Parallelism in Prolog. OR Parallelism

Functional programming in LISP

Transcription:

Introduction to Python Version 1.1.5 (12/29/2008) [CG] Page 1 of 243

Introduction...6 About Python...7 The Python Interpreter...9 Exercises...11 Python Compilation...12 Python Scripts in Linux/Unix & Windows...14 Exercises...16 Whitespace Significance...17 Line Termination...19 Comments in Python...20 Basic Output Generation...21 Simple User Input...23 Exercises...24 Python Modules...25 Module Search Paths...28 Determining the System Search Path...29 Exercises...30 Working with Variables...31 Python Variables...32 Naming Conventions & Rules...37 Types as Objects...38 Variable References & Garbage Collection...40 Sequence Types...42 Table of Contents Membership Statements...44 List Iteration...45 List Enumeration...46 Sequence Assignments...47 Mutable vs Immutable Objects...49 Multi Target Assignments...51 Assignment Shorthand...52 Exercises...54 Numeric Operations...55 More About Numeric Types...56 Numeric Tools...59 The Decimal Module...60 Operator Precedence...61 Exercises...62 String Types...63 Generating Strings...64 Common String Methods...67 Type Conversion...76 Exercises...78 Formatting String Output...79 Variable Substitution...81 String Slicing...82 Exercises...83 Page 2 of 243

Lists & Tuples...84 Python Lists...85 Common List Methods...86 Other List Operations...89 The range() Function...91 Multi-Dimensional Lists (Matrices)...93 Tuples...94 Dictionaries...96 Python Dictionaries...97 Assigning Values to Dictionaries...98 Dictionary Methods...101 Dictionaries vs Lists & Tuples...105 Exercises...106 Python Compound Statements...107 Python Nesting Recap...108 Comparison Operations...109 The if Statement...111 The if Ternary Expression...112 Using try To Handle Errors...113 The while Loop...115 Exercises...117 The for Loop...118 Traversing Parallel Sets...119 Exercises...121 Basic Input/Output with Files...122 Opening Files...123 Working with Files...124 Controlling Output Location...127 Exercises...129 Understanding Iterators...130 Iterable Objects...131 The iter() Function...132 Using map With Iterators...133 Exercises...134 Python List Comprehension...135 Basic List Comprehensions...136 Compound List Comprehensions...138 Exercises...139 Creating Python Functions...140 Function Basics...141 Defining Functions...143 Function Polymorphism...144 Argument Defaults...145 Lambdas...146 Local Variables...148 Variable Masking...149 Understanding builtin...150 Preventing Variable Modifications...151 Exercises...152 Argument Matching Methods...153 Exercises...156 Modules & Packages...157 Module Basics...158 Packages...160 Page 3 of 243

Using all and _ Variables...163 Using name...164 Exercises...165 Object Oriented Python...166 About OOP...167 The Class Statements...168 Class Inheritance...170 Classes as Objects...172 Using Dictionaries...174 Understanding self...176 Overriding Inherited Methods...178 More Inheritance...179 Operator Overloading...180 The iter Method...182 The getitem Method...184 Empty Classes For Storage...185 Pickling & Shelving Objects...186 Exercises...188 Multiple Inheritance...189 Exceptions...191 About Exceptions...192 Python's Default Exception Handler...193 Using Try/Except/Finally Exceptions...194 Generating User Defined Exceptions...196 More on Exceptions...197 Exception Examples...198 Using Asserts...201 Exception Classes...202 Exercises...203 Python Generators...204 About Generators...205 Generator Syntax...206 Communicating with Generators with send()...207 Exercises...209 OS Interfacing...210 About the sys & os Modules...211 Gleaning More Using doc & help()...212 Common sys Module Attributes & Methods...213 Working With the os Module & Files/Directories...215 File & Path Examples...218 Working with os.path...219 os & os.path Module Examples...221 Running Shell Commands...222 Accessing Databases with Python...224 About Database Access...225 About psycopg2...227 PostgreSQL Connect Strings...228 Cursor Objects...231 PsychoPG2 Examples...233 Exercises...236 Python & the Web...237 About the Web...238 Understanding HTTP...239 Using the CGI Module...240 Page 4 of 243

Questions?...242 Where to Get Answers/Next Steps...243 Page 5 of 243