Python Basics, Pythons 101!

Tags: python, machinelearning, programming, datascience
Published: 2021-07-24 17:10:26

**Introduction: What is Python?**

Python is a general-purpose, high level, interpreted language with easy syntax and dynamic semantics. The development of python started as a hobby for its creator Guido Van Rossum in 1989. He wanted to make a language that was beautiful to look at and easy for everyone to read. To do this he used indentation instead of curly braces to basically describe the various blocks of code. The language did not receive so much ‘love’ initially because it was slower than other languages at the time. With the rise of machine learning and artificial intelligence, python has come into the spotlight. It makes the tasks much more useful and easy to implement. With the increased computing power available currently, the focus has shifted to increased productivity even if there shall be some extra time taken when python is used.  

**Why is Python popular?**

* Python is the best language to learn as a first-time programmer. Its easy syntax and high-level features make it the best. It is the language for everybody. 

* Python is an open-source language meaning it is free for anybody to use. 

* Python can be used to make almost anything. Python can be used in GY applications, web applications, mobile applications, server-side coding, artificial intelligence, machine learning and many more. Python always finds a way to do that which you need to be done. 

* Python has a huge library or modules support. There is a big community that comes together to make the libraries or modules that can be used to obtain any solutions. For example, machine learning algorithms are already available and you can use them to obtain better solutions. You will hence end up having higher productivity and much less coding in this case. 

**Features of Python**
* *Simplicity*. This makes python fun. It makes you think more of your solution rather than the syntax.
Portability. Python code can be shared among different people and devices and its working remains identical holding all other factors constant. 

* *Interpretation*. Python is an interpreted language because it goes through an interpreter, which turns the code into the language understood by your computer’s processor. This makes the management of CPU, memory and debugging much simpler. 

* The *huge library support* will help you to obtain solutions to your problems easier. You can get started off with data science, web development and others on the go with python. 

* *Object orientation*. You may have questions about how developers make apps that are tuned to a specific domain. This is due to the Object-Oriented Programming concepts. Python supports OOP meaning you can model a real-world problem into your code. 


**Where is Python used in the industry?** 

* [Google](https://www.google.com) - Google uses python to provide better search results based on the ranking of websites and much more. 
* [Dropbox](https://www.dropbox.com)-This cloud storage platform uses python in its server and client applications.
* [Netflix](https://www.netflix.com)-Netflix uses machine learning with python to cluster users based on their interest in shows and tailor them such that watchers stick around longer. 
* [NSA](http://www.nsa.gov/)-NSA uses python for cybersecurity analysis, encryption and decryption. 
* [BitTorrent](https://www.bittorrent.com/)-It started as a simple python file. Uses python to transfer files in a peer to peer scenario. 

**Getting Started**

First, [download the latest version of Python](https://www.python.org/downloads/) from the download page.Check the documentation and installation manual provided there ans ensure all system requirements are met prior to installation. 

**Your "Hello World!"**

Create a new folder. You might as well name it *helloworld*

Launch [VS code](https://code.visualstudio.com/) or any other source-code editor of your choice and open the *helloworld* folder. 

Create a new .py file such as *helloworld.py*

Enter the following line of code;

 
```python
print('Hello, World!')
```
 The print() is an inbuilt function to display screen messages. In this case, **Hello, World!** message will be shown. 

To execute the helloworld.py file,launch the Command Prompt if on Windows or the Terminal on macOS or Linux. VS code also has an inbuilt one. 

Navigate tyo the folder where the .py file is saved and type  

```
python3 helloworld.py
```
to display
```
Hello, World!
```
Now that you have written your first python, welcome to the world of [python programming](https://docs.python.org/3/tutorial/)