Easy learning with example program codes

Execute Python

Execute Python:

Python codes can be executed in three ways:

Script Mode:

Writing Python code in a text editor and saving it with a .py extension. This file can then be executed in the Command Prompt.

Interactive Mode:

Writing Python code in a Python interactive shell. This method is useful for immediate testing of code with no stress of writing and saving the code in a file. This method is suitable only for testing purpose and for small codes.

IDE Mode:

Writing Python code in an Integrated Development Environment or IDE, such as Thonny, Pycharm, Netbeans or Eclipse. This method is suitable for managing large numbers of Python files simultaneously.


Example 1: Printing “HELLO WORLD” in python using Script Mode.




Example 2: Printing “HELLO WORLD” in python using Interactive Mode.

Example 3: Printing “HELLO WORLD” in python using Interactive Mode and using a Variable.

Sign Up/ Sign In
Ask a Question

Industrial Training

We offers Placement Oriented Training on Java, Spring, JSF, Hibernate, PHP, AngularJS, Angular 4, PLSQL, Oracle BI Publisher etc. We also provides Online training, please mail us at


We also provides the Development services for Website Development , Java Development, PHP Development, Android App Development etc. You can contact us on

Copyright © 2018 CodesJava Protection Status SiteMap Reference: Java Wiki