Amazing technological breakthrough possible @S-Logix pro@slogix.in

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • pro@slogix.in
  • +91- 81240 01111

Social List

What is interactive and scripting mode programming in python?

Description

To see different mode of programming in python.

Process

  Interactive mode programming.

  Invoking the interpreter without passing a script file as a parameter.

  Scripting mode programming.

  Invoking the interpreter without passing a script file as a parameter.

  Python files have the extension .py. We should save the python file with .py extension.

Sample Code

Source code:(Interactive mode programming)

#Type python3 on terminal

$ python3

Python 3.7.0 (default, Oct 9 2018,
10:31:47)

[GCC 7.3.0] :: Anaconda custom
(64-bit) on linux

Type "help", "copyright", "credits"
or "license" for more information.

# After getting >>>, we can type
our codes

>>> a=5

>>> b=10

>>> c=a+b

>>> print(c)

15

Source code:
(Script mode programming)

#First save the file with .py
extension

#Second we should specify the path of
file where its actually stored

#program code

a=5

b=10

c=a+b

print("The addition of a+b is:",c)

Screenshots
What is interactive and scripting mode programming in python see different mode of programming in python