We have seen how to execute Python codes on Windows IDLE editor. This is a small post about executing python codes on Linux Operating System’s Terminal. We will be using the GNU Nano editor for this purpose.
- Type “Terminal” in the Search Box on the top left corner. Click on Terminal.
- The terminal window appears .
- Type ‘nano (program name).py’ and press Enter.
- This takes you to the editor screen. Here is where you type your code.
- After the code is typed you can exit editor by pressing Ctrl+X.
- To execute your code, enter ‘python (program name).py’ and press Enter.
- The output will be displayed as “hello”