Python is an interpreted programming language; this means that as a developer you write Python (.py) files in a text editor and then put those files into the python interpreter to be executed.

In addition to this you can also use “Visual Studio” or “Visual studio code” to execute your python code. Only you need to take care that latest Python version must be installed on your machine.

In this sample code I’ll use Visual Studio 2019. While installing visual studio I select the python option. This will allow you to create Python project using Visual studio. Once you’ll run the code it will ask you to install python.exe then you can install if it is not present on your machine. Please install it for all users and also check set environment variable check box while installing. That’s it.

Adding new Python page:

  • Go to Visual Studio-> select create new project option -> select Python language and create project.
  • Now right click on your project and add new python file as shown below.
Python QuickStart

  • Now helloWorld.py file will get added to your solution.
  • Open file and type print(“Hello, World!”) and save it.
  • Run using run button or press F5, you will see output in console as shown below.
Python QuickStart

Check Python Version:

To check the Python version of the editor, you can find it by importing the sys module. We’ll learn how to import custom modules in our coming tutorials.

import sys

print("-"*60)  #it will print a line with hyphen
print(sys.version)
print("-"*60)

Different flavors of Python:

Flavors of python refer to the different types of python compilers. These are useful to integrate various programming languages.

  • CPython: Standard python compiler implemented in C language. This is the python software being downloaded and used by the programmers directly.
  • Jython: Initially called as JPython, later renamed to Jython. Designed to run on a Java program.
  • IronPython: Designed for .NET framework.
  • PyPy: The main advantage of PyPy is performance will be improved because the JIT compiler is available inside PVM.
  • RubyPython: This is a bridge between Ruby and Python interpreters. It encloses a python interpreter inside the Ruby application.
  • AnacondaPython: Anaconda is a free and open-source Python programming language. This is mainly for data science and machine learning-related applications (large-scale data processing, predictive analytics, scientific computing). This aims to simplify package management and deployment.

Compiler vs Interpreter:

All the programming languages are converted to machine understandable language for execution. The conversion is taken care of by compilers and interpreters.

Interpreter: – An interpreter is one that runs the code line by line and executes instruction by instruction. The languages which use interpreters are called Interpreted languages. Such languages are slower in terms of execution and less efficient. Examples – PHP, Python, Ruby.

Compiler: – A compiler is one that takes the source code and converts it into machine-executable code at once. The processor takes the executable and executes it. The languages which use a compiler are called compiled languages. Compiled languages are faster and more efficient comparatively. Examples – C++, Java

High-level language vs low-level language

High-level language: –High-level programming languages are those which are programmer friendly. Humans can easily understand it which helps in easy maintaining and debugging of the code. These types of languages need a compiler or interpreter for execution. High-level languages are the most commonly used languages. Examples – C, C++, Python and Java.

low-level language: –Low-level programming languages are those which are machine friendly. Humans can’t understand such languages. In other words, low-level languages are NOT human-readable. So, these languages, comparatively, are complex to debug. An assembler is required to debug these types of languages. Examples – Assembly language, Machine language.

Explore More

Python 10 Programs for Beginners

Program 1:Write a program to create a 2D array using NumPy. Output: Program 2: Write a program to convert a python list to a NumPy array. Output: Program 3: Write a program to create matrix of 3×3 from 11 to 30. Output: Program 4: Write a program to create a data frame to store data of candidates who appeared in

Find index of first occurrence when an unsorted array is sorted

Find index of first occurrence when an unsorted an array is sorted Given an unsorted an array and a number x, find an index of first occurrence of x when

Find sum non repeating distinct elements array

Find sum of non-repeating (distinct) elements in an array Given an integer an array with repeated elements, the task is to find the sum of all distinct elements in the