Tuesday, 28 February 2017

Space indentation in Python

python uses white space indentation,rather than curly braces or keywords,to delimit blocks.

white space = right space


in c language:

#include <stdio.h>
int main(void) 
{
       // your code goes here
         return 0;
}

in c++ language:

#include <iostream>
using namespace std;
int main() 
{
// your code goes here
   return 0;
}

in Java language:

import java.io.*;
class Classname
{
public static void main (String[] args)
{
// your code goes here
}
}

in c#(.Net) language:

using System;
public class Test
{
public static void Main()
{
// your code goes here
}
}


in Python language:

class classname:    
print("hai Siva")


Monday, 27 February 2017

Features of Python Programming

Features of Python Programming:

A Simple language which is easier to learn:

  • Python has a very simple and elegant syntax. It's much easier to read and write Python programs compared to other languages like: C++, Java, C#. 

Free and open-source:

  • You can freely use and distribute Python, even for commercial use

Portability:

  • You can move Python programs from one platform to another, and run it without any changes.

Extensible and Embeddable:
  • Suppose an application requires high performance. You can easily combine pieces of C/C++ or other languages with Python code.
A high-level, interpreted language:
  • Unlike C/C++, you don't have to worry about daunting tasks like memory management, garbage collection and so on.
Large standard libraries to solve common tasks:
  • Python has a number of standard libraries which makes life of a programmer much easier since you don't have to write all the code yourself. 
Object-oriented:
  • Everything in Python is an object. Object oriented programming (OOP) helps you solve a complex problem intuitively.


Sunday, 26 February 2017

Top 5 reasons to learn python

Top 5 reasons to learn python:


1).python having Intuitive data structures:

                Lists, Tuples, Sets, Dictionaries
                                Powerful, yet simple and intuitive to use flexible(mixed data types)


2).python having simple commands:

                In java:  string name=”bob”;                                       in python: name=”bob”
                                System.out.println(name);                                                print(name)



3) Sometimes python is a one liners:

                Elegant 1-line solution to what takes a whole block of code in other languages.
                Example: swap x and y
                                In java:                                                                 in python:
                                Int temp=x;                                                        x,y=y,x
                                         X=y;
                                         Y=temp;


4).python language having Simple Syntax:

                Some programming languages will kill you with () [] {} , : with python you spend less time debugging syntax and more time programming

5).python is a dynamically typed language:

                No type when declaring a variable, skip headaches of java type casting
                Ex:  in java: int x=1;                          in python: x=1

                                    X=(int)x/2;                                            x=x/2

Saturday, 25 February 2017

Python and R-programming

Python and R-programming:



NOTE:
  • This content prepared based upon my knoweledge on R programming and Python
                      R-programming
                  Python-programming
R is a general purpose programming language, it is a Interactive, high level and object oriented programming language.
Python is a general purpose programming language; it is a Interactive, Interpreted, High-level, dynamic, object oriented and scripting programming language.

R is a open source
Python is a open source

Developed by “Ross Ihaka and Robert Gentleman” in 1993
Developed by “Guido Van Rossum” in 1989, the first version of the python released in 1991

Easy to learn
Easy to learn
Easier syntax:
Example:
Function-name <- function(arg1,arg2,…….)
{
       Statements
       Return (object)
}

Very easier syntax
Example:
Def function -name (arg1, arg2, …):
             Statements
              Return
R prompt will be show the  symbol

Python prompt will be show the  >>> symbol
R programming performs some types of data analysis/analytics: only on  fixed data(offline data only)
*àStatistical analysis
àMachine Learning
àNormal analysis
àData mining
Python programming performs  all the types of data analysis/analytics: both fixed data and streaming data( offline data and online data)
àNormal analysis
àpredictive analysis
àStatistical analysis
àSpatial analysis
àData mining
àMachine Learning
*àSentimental analysis
*àStreaming analysis

Friday, 24 February 2017

Why the name Python

Why the name Python ?


  • Guido Van Rossum was fan of a comedy series from late 1970's . The name "Python" was adopted from  the same series "Monty Python's Flying Circus" broadcast by the BBC from 1969 to 1974.

Why Python was created ?

Why Python was created ?

  • In  late 1980's, Guido Van Rossum was working on the Amoeba distributed operating system group.

  • He wanted to use interpreted language like ABC( ABC has simple easy-to- understand syntax)that could access the Amoeba system calls. so, he decided to create a language that was extensible. 

  • This led to a design of new language which was later named Python

History Of Python

History Of Python:



  • Python is a fairly old Language created by Guido Van Rossum. The design Began in the late 1980's and was first Released in Feb-1991.

Thursday, 23 February 2017

Why Python

Why Python:



There are many high-level languages. 

The language you will be learning is Python. 

Python is one of the easiest languages to learn and use, while at the same time being very powerful.

It is used by many of the most highly productive professional programmers. 

A few of the places that use Python extensively are Google, the New York Stock Exchange, Industrial Light and Magic, .... 

Also Python is a free language! If you have your own computer, you can download it from the Internet....

Friday, 17 February 2017

Python is a general purpose programming language, developed by Guido Van Rossum in 1989, first version released in 1991.

Thursday, 16 February 2017

Python

now a days python is more popular programming language, why ?