DEV Community

Cover image for Intro To Programming With Python -0
Introschool
Introschool

Posted on

Intro To Programming With Python -0

What does programming mean?

Programming is a way to instruct a computer to perform various tasks. The instructions could be a simple task like adding two numbers and it could be complex as well as writing a program for the self-driving car.
A computer stores data in its memory. Programming is writing logically steps to process the data and get it into the desired format. We use programming to solve different problems. You break the problem into smaller parts and write the steps of solving the problem. These steps are called an algorithm. Now you have a solution to the problem but to implement the solution we need a programming language. Programming languages are used to write such instructions.

What is a programming language?

A programming language is a tool to write programs or algorithms. Programming languages are consist of a set of instructions for computers. Each programming language has its own syntax. The syntax is just like a grammar of a programming language.

The computer programs are written in High-Level Languages but the computer can only understand machine language(0 or 1) which is also called low-level language. The code in high-level language is converted to machine language, so the computer can understand the program and execute it.

What is the difference between High-Level and Low-Level Language?

High-Level languages are nearly human languages which are more complex languages. It’s like you are writing weird English. Whereas low-level language is like writing actual machine code. Low-level language is fast as compare to high-level language. High-level languages are converted to low-level languages using compiler or interpreter.

What is the difference between Compiled language and Interpreted language?

You know that computers can only understand in a machine language. The translator is needed to convert High-level language into low-level language or machine language.
A program written in a high-level language is called source code. So the Compiler or Interpreter are used to translate source code into machine code.

Compiler scans the entire program and translates it as a whole into machine code. It takes a large amount of time to analyze the source code but total execution time is comparatively faster. The languages which are compiled are called compiled languages. Examples are C, C++.

Interpreter translates the program one statement at a time. The analyzing source code time is less but the overall execution is slow. The languages which are interpreted are called Interpreted language. Examples are like Python, JavaScript.

What is Python?

Python is a high-level, interpreted, general-purpose programming language. Python can be used to build almost anything. Python syntax is easy to learn, the code written in Python language is easy to read also. It is just like you are reading English.

Python is a dynamically typed language. It means that when you name a variable in Python, you don’t need to define a type of variables like whether it is a number or string. This feature makes writing code faster in Python.

Who Created It - Guido Van Rossum
When - It was initially released in 1991 and the first version came in 1994.

Python Versions

Versions in programming languages are used to keep track of the features or changes. Python first version came in 1994. The latest version right now is Python 3.9
The version numbers are given according to the changes. Let’s suppose there is a python version Python X.Y.Z, Here X is for major changes, Y is for minor changes, Z is for patches.

Major Changes → Increment X
Minor Changes → Increment Y
Patch(Bug fix) → Increment Z

In this python tutorials, we will use the Python3 version.

Why should you learn Python?

  • Python is a very popular language and it can be used almost everywhere. You name the field and Python is there. So Python gives you a variety of options to work on according to your interest. Some of them are listed below. 1.Web Applications 2.Data Analysis 3.Data Science and Machine Learning 4.Build games in Python 5.Web Scraping 6.Graphics User Interface(GUI)
  • If Python is your first programming language, then congratulations. Python is beginner friendly, Because of its easy syntax and code readability.
  • There are many standard libraries in Python. Having many libraries and packages is one of the main features of Python.
  • Python has a large community so that if you are stuck somewhere you can take help from them.
  • Python is free to use even for commercial purposes. You can install Python on every platform like Windows, Mac or Linux.
  • Python is not a compiled language, meaning the written code does not compile into machine code, that's why the same code can be run on other platforms if it has a python interpreter installed.

Top comments (0)