Saturday, 3 July 2021

*Episode 3* PYTHON (How to Install Python on Linux)


Installing Python on Linux


This episode covers :-


  1.) How to install Python on Linux.

  2.) How to use the interactive interpreter to test it.


  •   Installing Python:-


       Click the Show applications icon at the bottom left corner:



       Search for terminal and click the icon to open it:


      
       Open the Python interactive prompt with python3 command:



       If the python3 command doesn’t work, install it with the following command:




  •  Using the interactive prompt :-

      Type python3 in the terminal and press enter.

      The interpreter is now in interactive mode, waiting for your commands. Let’s
add two variables together and print out the result with print() function:



       Exit the prompt with Ctrl-D plus Enter.


Python interpreter


        Interpreter is a software layer between your program and the computer. It reads your code and carries out the instructions it contains.

       You can type and run Python code directly in the interactive prompt. This allows us to interact with Django projects using the command line.


Summary


  •  Python comes pre-installed on all major Linux distributions.
  •  Interpreter is a software layer between your code and the computer.
  • You can use the interactive prompt to type and run Python code.

👈Episode 2(P).                                                                                Episode 4(P)👉
Share This Post

PRINT THIS POST

No comments:

Post a Comment

If you have any doubts. Please let me know.

Featured post

*Episode 1* MCQ for Govt. Job/ Private Job/ MNCs

  Topic:- One Word Substitution 1) Especially skilled in storytelling  Answer:- Raconteur 2) Fear of loneliness Answer:- Eremophobia  3) Usa...