Getting Started With Python | Download and Installation Instructions

Getting Started With Python

/ins>

The Python Installation

Python often comes pre-installed in a lot of different Macs and Pcs. However, if you are not sure about whether you already have Python pre-installed in your Pcs or Macs then you can try searching for Python in the start bar of your Windows Pc or you can run a particular type of command on the command line. And that particular type of command is mentioned below.

If you own a Linux or a Mac then you cannot use the command mentioned above. Instead, you will be required to use the command which is mentioned below.

If Python is not pre-installed on your Pcs, Macs, or Linux then you can download this software for free by clicking on the following link https://www.python.org/.

 

The Python Quickstart

We have mentioned this previously in the Python tutorial that Python is a programming language that is often categorized with the term interpreted. This term interpreted basically means over here that if you want to execute any Python file then you as a developer would have to write that Python files (.py) in a text editor and then put it in the Python interpreter to successfully execute it.

Python files are run on a command line for example.

Here the name of the file is hellowworld.py

Now, if you want to write your first python file then just open any text editor and write say “Hello, World!” This can be written in the below-mentioned manner

Now after writing that, you just need to simply save your file. You can then choose to run your file by opening the command line, navigate to the directory where you have saved your helloworld.py file and then simply run it.

The output that you get to see after running the command must be something like

Output
Hello, World!

If you get a similar output then you need to pat yourself on the back as you have just successfully written and executed your first Python program.

 

The Command Line of Python

It is also important for you to be aware of a quicker and easier way of testing a short amount of code in Python. This little trick is made possible because of the fact that you can also choose to run Python simply as a command line too. To try out this little method you can start by typing the following on your Mac, Linus, or Windows command line.

After writing this on the command line, you can choose to write any kind of short codes that you want to. For example

Once you have written all that then you can find the “Hello, World!” written in the command line.

Output
Hello, World!

And once you are done with the Python command line then you can simply type the following to quit the interface of Python command line.