Ask Question
28 August, 04:14

What is a Python script?

2. Explain what goes on behind the scenes when your computer runs a Python program.

+2
Answers (2)
  1. 28 August, 06:46
    0
    1. A python script is a reusable text file of python lines of code.

    2. The interpreter compiles each line of code individually.

    Explanation:

    A python program written for a particular function can be saved as a script with the. py extension. When saved, the program codes in converted to text file and when called upon, it converts back to a python program.

    When a python program is run in a computer, the processor runs the interpreter program on the code compiling and debugging each lines of code.
  2. 28 August, 08:07
    0
    1. Python Script:

    Python script is a text file that contains statement comprising a Python program. Python script file is saved with an extension of '. py'. Once you created a python script, it can be used as many times as required.

    2. How a Python program executes:

    Python program executes in following steps:

    1. At first step python program is written in text editor or IDE (integrated development environment). Then programmer saved this source code to a file with. py extension. This file is called script file.

    2. After writing source code, programmer uses compiler to interpret the source code to byte code

    3. Python virtual machine then translate this byte code into instructions that can interact with operating system of computer.

    4. Operating system then execute these instructions.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “What is a Python script? 2. Explain what goes on behind the scenes when your computer runs a Python program. ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers