## Pyhton Chapter#6: Numbers

Ankur Kulhari

In python numeric data types store numeric values. Number objects are created when a value is assigned to them. Ex: num1 = 5 num2 = 10 Four different numerical types are supported in python: int (signed integers) long (long integers, they can also be represented in octal and hexadecimal) float (decimal/real values) complex (complex numbers) Mathematical Functions Python includes following …

## Python Chapter#5: Loops

Ankur Kulhari

To execute statement/s multiple times, loops are used. Python loops: Python While Loop Python For Loop Python Nested Loops While Loop Condition is tested before executing the loop body. The condition may be any expression, and any non-zero value is considered as true The loop iterates while the condition is true When the condition becomes false, program control passes to …

## Python Chapter#4: If-else

Ankur Kulhari

In Python: Any non-zero and non-null values are considered as TRUE, and Zero or NULL are considered as FALSE value Python has 3 types of decision/if-else statements as: Statement Description Syntax if An if statement consists of a boolean expression followed by one or more statements. Ex:Boolean expression: (x>y) if expression: statement(s) if…else An if statement can be followed by …

## Python Chapter#3: Basic Python Operators

Ankur Kulhari

An operator is a construct which performs some operation: arithmetic or logical, on operands. Operators in Python Python has following operators: Arithmetic Operators Comparison/Relational Operators Assignment Operators Logical Operators Bitwise Operators Membership Operators Identity Operators Python Arithmetic Operators Operator Description Example [x=33, y=10] Addition (+) Binary addition operator which adds both operands. x+y=33+10=43 Subtraction (-) Binary operator which subtracts right …

## Python Chapter#2: Variable Types

Ankur Kulhari

A variable is associated with pair of a storage location and associated symbolic name (an identifier), i.e. [location,identifier]. Location is used by system and identifier is used by user/programmer to access the variable When a variable is created, some space in memory is reserved Data type of a variable decides, the amount of reserved memory and what can be stored …

## Python Chapter#1: Getting Started with basic syntax

Ankur Kulhari

In python there are two modes available to program as Matlab: Interactive Mode Programming Script Mode Programming Now let’s see how to program in these modes: Interactive Mode Programming Python instructions can be directly executed from the python prompt. Ex: Ex: Ex: Script Mode Programming Similar to m file in matlab, python also provides facility to write program in a …

## Install .whl packages for Python

Ankur Kulhari

Now mostly packages are launched in .whl form. Whl packages can be installed easily with pip command. To install whl packages, you first need to download .whl package file from python website. Once you have the package on your system you can install that easily following below steps: Open command prompt (cmd) [start–> cmd] Change your current working directory to …

## Install packages in Python 3.6 using pip from command prompt (cmd)

Ankur Kulhari

Package installation with pip in python 3.6 can be done through following steps: Open command prompt (cmd) [start–>cmd] Type pip install Make sure system is connected to internet. If you are connected to Internet through proxy [login username and password required], follow these steps: Open command prompt (cmd) [start–>cmd] Set the proxy settings by typing following commands: set HTTP_PROXY=http://domain\username:[email protected]:port set …

## Installing Python 3.6 with OpenCV on windows for Image Processing

Ankur Kulhari

For Image processing Python with OpenCV library is widely used. OpenCV provides a vast list of Image Processing techniques (like Enhancement, Segmentation, Feature extraction etc.). Along with “numpy” and “matplot” OpenCV provides easy and strong facilities for image processing. Follow these steps to install Python and OpenCV: Download Python 3.6 (Freeware) [32 bit/64 bit]. Install Python 3.6 on your system with default …

## Operating Systems: Application Programs vs System Programs vs System Calls

Ankur Kulhari

The difference among Application Programs, System Programs and System Calls: Application program: a program used to interpret the semantic content of messages entered by the end user of the system. System Program: a program, that provides system services to application programs and also controls some aspect of the operation of a computer is termed as system program. System services here …