A Python program can be run in the following two ways:Running a Python program in a Python shellFire up your IDLE (Python GUI) fileSimply type in your Python script and press enterYour program will start runningRunning a Python program stored in a fileIn order to run a Python program stored as a Python script in a file, follow the given steps:Write your script in an independent fileSave the file with a ‘.py’ extension, thus indicating to the system that the file is a Python program.Initialise the terminal on your system.Navigate to the directory where you have stored your file with the .py extension by typing the following command in the terminal:Cd directoryName.Now press enterType the commandChmod a+x filename.py in order to inform your system that the said file is an executable program.Next, type ./filename.py in order to run your program.