Example HTML page

Execution modes in Python

Modes of execution in python

Python can be executed in the following two ways. Basically python has two modes namely:

  1. Interactive mode
  2. script mode

1. Interactive mode programming

  1. In this mode of execution we can run commands, can execute single or few lines of code very easily and with the great convenience.
  2. The symbol “>>>” denotes that the shell is ready for use.
  3. The following figure represents the interactive mode programming.

2.Script mode programming

  1. Another way to execute python programs is Script mode.
  2. In this we can execute single or many lines of code and save this in a file with “.py” extension
  3. For this double click on IDLE  -> ctrl+n  -> ctrl+s
  4. Type your code and execute it by clicking on run ->run module, otherwise press “F5”.
  5. The below figure represents the script mode programming.

6. If you click ‘f5’, you will get the following output


Example HTML page

Leave a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest