Ask Question
23 February, 17:03

What is a Python script?

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

+3
Answers (2)
  1. 23 February, 19:39
    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.
  2. 23 February, 19:43
    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.
Know the Answer?
Not Sure About the Answer?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers