-->

Getting To Know Python


Python is the greatest computer programming language ever created. It enables you to fully harness the power of a computer, in a language that’s clean and easy to understand.

What Is a Programmer?


It helps to understand what a programming language is before you try to learn one, and Python is no different. Let’s take a look at how Python came about and how it relates to other languages.

Python


A programming language is a list of instructions that a computer follows. These instructions can be as simple as displaying your name or playing a music file, or as complex as building a whole virtual world. Python is a programming language conceived in the late 1980s by Guido van Rossum at Centrum Wiskunde & Informatica (CWI) in the Netherlands as a successor to the ABC language. Guido van Rossum, the father of Python.



Programming Recipes


Programs are like recipes for computers. A recipe to bake a cake could go like this:


  • Put 100 grams of self-raising flour in a bowl.
  • Add 100 grams of butter to the bowl.
  • Add 100 millilitres of milk.
  • Bake for half an hour.



Code





Just like a recipe, a program consists of instructions that you follow in order. A program that describes a cake might run like this:

  • bowl = [ ]
  • flour = 100
  • butter = 50
  • milk = 100
  • bowl.append([flour,butter,milk])
  • cake.cook(bowl)


Program Commands


You might not understand some of the Python commands, like bowl.append and cake.cook(bowl).

The first is a list, the second an object; we’ll look at both in this book. The main thing to know is that it’s easy to read commands in Python. Once you learn what the commands do, it’s easy to figure out how a program works.





High-Level Languages


Computer languages that are easy to read are known as “high-level”. This is because they fly high above the hardware (also referred to as “the metal”). Languages that “fly close to the metal,” like Assembly, are known as “low-level”. Low-level languages commands read a bit like this: msg db ,0xa len equ $ - msg.


wiki high level programming language



ZEN OF Python


zen python


Python lets you access all the power of a computer in a language that humans can understand. Behind all this is an ethos called “The Zen of Python.” This is a collection of 20 software principles that influences the design of the language. Principles include “Beautiful is better than ugly” and “Simple is better than complex.” Type import this into Python and it will display all the principles.




Python 3 VS Python 2


World Of Python


When you visit the Python Download page you’ll notice that there are two buttons available: one for Python 3.6.2 and the other for Python 2.7.13; correct at the time of writing (remember Python is frequently updated so you may see different version numbers).



PYTHON 2.X


So why two? Well, Python 2 was originally launched in 2000 and has since then adopted quite a large collection of modules, scripts, users, tutorials and so on. Over the years Python 2 has fast become one of the first go to programming languages for beginners and experts to code in, which makes it an extremely valuable resource.

Python Shell


PYTHON 3.X


In 2008 Python 3 arrived with several new and enhanced features. These features provide a more stable, effective and efficient programming environment but sadly, most (if not all) of these new features are not compatible with Python 2 scripts, modules and tutorials. Whilst not popular at first, Python 3 has since become the cutting edge of Python programming.



3.X WINS


Python 3’s growing popularity has meant that it’s now prudent to start learning to develop with the new features and begin to phase out the previous version. Many development companies, such as SpaceX and NASA use Python 3 for snippets of important code.



0 Response to "Getting To Know Python"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel