What is Python
Python is a high-level programming language. A programming language is simply one used to write codes closer to human language which when processed help to communicate with machines. To be more precise, Python is a scripting language.
A scripting language is a category of programming language that executes codes line by line. That is, whenever you try to execute your entire code, it is fragmented or processed one line at a time by the computer. This type of execution is of great advantage because it helps the coder identify exactly where an error or a bug is found in his code.
Python is the most widely used language mainly because its flexibility and reliability in all tech fields. Python gains most of its popularity when dealing with data (data science, AI, ML...etc).
Feature overview
It has web-dev frameworks (django, flask) which tend to be more flexible, scalable and security profitable than other frameworks of other programming languages
It is the best when it comes to data analysis and visualization due to its user-friendly feature, its large library and scalability
Python is a user-friendly, easy to learn programming language suitable especially for people with no technical experience
Get Started
To get started with programming in python language, you need to install python setup from python and depending on the operating system you are using, you will choose which setup is suitable
You now have to install a suitable python editor or an IDE to run your python codes. The best python editor is pycharm because it has the best featured to ease your code writing and easy to install.
Editor's dashboard
In order to create a new project on pycharm, you open your editor and this will show up:
Then you click on new project found on the top right of the page and name your project as follows:
When it's done. The home page of your pycharm dashboard will appear like this:
My First Python code
Here I am going to show you how to write your first python code. In your editor write the following command:
print("Hello World!")
and press start button on the top right of your editor
This will be the output of your code. Congratulations, you wrote your first python code
Keywords, Built-in functions and syntax in python
Keywords
Python has many keywords which are are all useful one another and their frequency of usage depends on the project complexity and category you are working on. As you keep learning more about about, you will come across all these keywords
Built-in functions
These are functions which come already installed with your python software. The most common python built-in function here is the
print()
function
Syntax
Syntax refers to a set of rules that define the structure of a language. Like every other languages, being it programming languages or not, thy have their syntax to be followed in order for the language to be right. Here are some of the syntax used in python programming language:
Brackets
()
which are used whenever you call a function. For example when you say
print("Hello World!"). This is understood by the python interpreter only when you have these brackets enclosing your text
Colon
:
which is often used when dealing with conditional statements, loops, classes and functions.
For example:
def func():
print("Hey")