I will start this Python Tutorial by giving you enough reasons to learn Python.
Python is simple and incredibly readable since closely resembles the English Language. It’s a great language for beginners, all the way up to seasoned professionals. You don’t have to deal with complex syntaxes, let me give you an example:
If I want to print “Hello World” in Python, all I have to write is:
1 | Print (‘ Hello World ‘ )
It’s that simple.
This blog on Python tutorial includes the following topics:
- Python Applications
- Data types
- Conditional Statements
Let me give you one more motivation to learn Python, It’s wide variety of applications.
Python will find application in a lot of domains, below are few of those:
This is not all, it is also used for automation and for performing a lot of other tasks.
After this Python tutorial, I will be coming up with a separate blog on each of these applications will explain.
Python is an open source scripting language, let’s look at some cool features of Python.
Let’s move ahead in this Python tutorial and understand how variables work in Python.
Variables in Python:
Variables are nothing but to reserved memory locations and to store the values. This means that when you can create a variable and you reserve some space in memory.
In Python, you don’t need to declare variables before using it, unlike other languages like Java, C etc.
Assigning values to a variable:
Python variables do not need an explicit declaration to reserve memory space. The declaration will happen automatically and when you can assign a value to a variable. The equal sign (=) is used to assign values to variables.
Consider the below example:
1 s = 10
2 Print (s)
This will assign value ‘10’ to the variable ‘S’ and will print it. Try it yourself.
Now in this python tutorial, is the time to understand Data types.
Data Types in Python:
Python supports various data types, these data types have defined these operations possible on the variables and the storage method.
Below is the list of standard data types available in Python.
Let’s discuss each of these in detail. In this Python tutorial, we will start with ‘Numeric’ data type.
Just as expected Numeric data types store numeric values.
They are immutable data types, this means that you cannot change it’s value.
Python supports three different Numeric types:
- Float type
- Integer type
- Complex type
I hope you have enjoyed reading this tutorial. We have covered all the basics of Python in this tutorial. We will be coming up more blogs on Python.