Hai ,
Here is my blog which i learn from the google i used to post in this space..
so there might be some contents will taken from other source too as a part of learning.
The learn will be made Easy here.
If you like and Need to learn like this more..
Do Follow...#Tech Bird
If you like and Need to learn like this more..
Do Follow...#Tech Bird
Lets Start with Python.!
Example 1:
How to Write "Hello World !" in python
It is much simpler than other programming languages.Yup!
Syntax:
print "Statement"
Example:
print "Hello World!"
Output:
Hello World
Note Worthy: In python there is no need to place a ; once the statement is ended.
Example 2:
How to add two numbers in Python.
Its is as such as simple maths problem..Yup!
Example:
a=10
b=10
c
c=a+b
print "c values is: "+c
Output:
c values is : 20
Note Worthy: In python you don't have to define the type of variable you are using like java or c..
For eg: in java int a=10, int b=10;
But in python you don't really have to worry about the data type Define...Directly you can use it.!
Example 3:
Lets see How to use the If statement in python.
Syntax:
if (condition) :
statement
else :
statement
Note Worthy: In python you don't have any braces like { } like java or c. Here Python Follows Indentation .
What is Indentation?
Indentation is way by which the blank space are used instead of the { } .
Example:
a=10
if a ==10 :
print "The values is 10"
else :
print "The values must be other than 10"
Output:
The values is 10
Next Post:
Python #2-Tuples and Lists in Python
______________________________________________________
Comments