
Python-Introduction to the Programming Language
Python is a snake but we are not taking about a snake here. We are talking about a programming language.
Qualities
It is:
What is it used for?
Python is used for the following:
It was nice that PHP was for along time helped with free resources and many docs.
History
Python was invented was conceived’ in the 1980’s by Guido Van Rossum from Netherlands. It was launched in 1990s.
Reason why Python’s sudden Popularity
Python is not a new language but suddenly it has become popular. There must be reasons (I was wondering) for which it has become popular.
Listed below are some advantages of Python:
Python is popular with Developers and this usually be cause of efficiency. It is true for any language.
Here are three main reasons why Python is popular with Developers:
Python is great for web development.
Web Development
There are few frameworks for Web development using Python.
Most Commonly used:
Installing in Windows:
Many of us are using Windows and other Operating systems.
Pre requisites of installing Python:
Steps to Install Python in Windows:
Great, you have installed. This article is not showing every step since you should now bye now know how to install. Do not take errors as some curse. Rather you learn when you make mistakes. I remember in 2003, where technological resources were scarce and technology was not promoted by government then.
I had to figure out how to Install PHP, Apache and mySQL separately and connect them together until Xampp came. If you are a PHP developer and starting from trying to install Xampp. Hold it, no install the traditional way. That is if you want
to be a great developer.
Missing something
After Install:
If you are still stuck in Installation then visit this link.
The Main code
We try to figure out how we start. It is very simple.
We add two simple numbers, integers.
But let us go quickly to Python basics
Data types:
Code to add two numbers:
x = 5
y = 10
print (x + y)
We see how python solves a Quadratic Equation.
The formula for quadratic equation is: ax2 + bx + c=0.
a, b and c are all co efficient and real numbers.
The discrimant ,D=b2–4ac.
Solutions of x are:
The above is from maths in school.
We go the code:
from math import sqrt
check_input = True
while check_input:
a, b, c = eval(input(“Please enter the a, b, c coefficients of your quadratic equation: “))
try:
float(a), float(b), float(c)
check_input = False
except ValueError:
print (“Please make sure the coefficients are real numbers and try again”)
check_input = True
disc = sqrt(b*b-4*a*c)
if disc >=0:
x1 = (-b+disc)/(2*a)
x2 = (-b-disc)/(2*a)
print (“The roots of the equation are:”, x1, x2)
else:
print (“The equation has no solutions”).
It is seen that the code needed for a certain operation in python is less for than in other languages.
Applications :
Where are we applying Python? First time I heard about the language , reminded me of the Movie” Anaconda”.
We people in the IT Sector keep giving catchy names:
Yahoo!
CakePHP
FuelPHP
Aura.
Application areas of Python:
Here list of areas where Python is applied:
There are well known Software using all or parts .
This is really interesting and all the more to start learn the language .
But you do have to learn Programming first.
Conclusion:
Python happens to be the trend in Programming, something like when PHP was around 2000.
Our previous post on programming talks about languages to be learnt initially.
tweet Follow @techkhala
Book
No Publisher Specified
Python Programing: Using Problem Solving Approach
No Publisher Specified
Python Programing: Using Problem Solving Approach
Rate the post
0
10
An idea how post is.
