Complete Guide For Python Programming

 Complete Guide For Python Programming

Quick & Easy Guide To Learn Python

By: James P. Long

ACKNOWLEDGMENTS

For my students and friends, who all selflessly helped me in writing this book. Special thanks to those who asked, insisted and assisted me in turning the seminars in this practical form. All Rights Reserved 2012-2015 @ James P. Long

Table of Contents

Introduction .............................................10 Python Versions .......................................13 Some Commonly used Operations in Python ...................................................... 15 Printf Format Strings ..............................20 Python Interactive - Using Python As A Calculator

.................................................22

Python Implementations ........................26

Python Compilers & Numerical Accelerators .............................................31

Logical And Physical Line in Python ......34

Python Indentation .................................37

Python Standard Library ........................39

Creating Classes & Objects .....................43

Documenting Your Code ........................46

Python - Object Oriented Programming 49

Python Database ......................................55

Classes ......................................................65

Methods ...................................................71

Instances ..................................................75

Python Database Access .........................82

Python Networking ...............................108

Sending Mail in Python .........................117

Python multithreading .........................127

Python xml processing .........................148

Python Programs ..................................166

Python Program to Add Two Matrices 166

Python

Program

to

Add

Two

.................................................................168

Numbers

Python Program to Calculate the Area of a Triangle ..................................................169

Python

Program

to

Check

..................................................171

Armstrong

Number

Python Program to Check if a Number is Odd or Even ...........................................173

Python Program to Check if a Number is Positive, Negative or Zero .....................174

Python Program to Check if a String is Palindrome or Not .................................177

Python Program to Check Leap Year ...179

Python

Program

to

Check

.................................................................181

Prime

Number

Python Program to Convert Celsius To Fahrenheit .............................................

183

Python Program to Convert Decimal into Binary, Octal and Hexadecimal ............184

Python Program to Convert Decimal to Binary Using Recursion ........................186

Python

Program

to

Convert

Kilometers

to

Miles

.......................................................187

Python Program to Count the Number of Each Vowel .............................................189

Python Program to Display Calendar ..190

Python Program to Display Fibonacci Sequence Using Recursion ...................192

Python Program To Display Powers of 2 Using Anonymous Function .................194

Python Program to Display the multiplication Table ..............................196

Python Program to Find Armstrong Number in an Interval ...........................198

Python Program to Find ASCII Value of Character ...............................................200

Python Program to Find Factorial of Number Using Recursion .....................201

Python Program to Find Factors of Number ..................................................203

Python Program to Find Hash of File ...205

Python Program to Find HCF or GCD ...207

Python Program to Find LCM ...............209

Python Program to Find Numbers Divisible by Another Number ...............211

Python Program to Find Sum of Natural Numbers Using Recursion ....................212

Python Program to Find the Factorial of a Number ..................................................214

Python Program to Find the Largest Among Three Numbers .........................216

Python Program to Find the Size (Resolution) of Image ...........................218

Python

Program

to

Find

the

Square

Root

.................................................................220

Python Program to Find the Sum of Natural Numbers ...................................221

Python

Program

to

Generate

a

Random

Number

..................................................222

Python

Program

to

Illustrate

Different

Set

Operations

.............................................223

Python Program to Make a Simple Calculator .............................................225

Python

Program

to

Multiply

Two

Matrices

.................................................................229

Python Program to Print all Prime Numbers in an Interval .........................231

Python Program to Print Hi, Good Morning! ................................................234

Python program to Print the Fibonacci sequence ................................................ 235

Python Program to Remove Punctuations form a String ..........................................237

Python

Program

to

Shuffle

Deck

of

Cards

.................................................................239

Python Program to Solve Quadratic Equation .................................................241

Python Program to Sort Words in Alphabetic Order ...................................243

Python

Program

to

Swap

Two

.................................................................245

Variables

Python

Program

to

Transpose

a

Matrix

.................................................................246

Note ........................................................248

More From Author ................................249

INTRODUCTION

Python is a wide used general, high-level programming language. Its style philosophy emphasizes code readability, and its syntax allows programmers to precise ideas in fewer lines of code that might be possible in languages like C++ or Java. The language provides constructs supposed to modify clear programs on both small and large scales.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download