Python #5 : Introduction to Variables (Core Programming)
What are Variables and Integers in Python?
Previous Posts: Python #1: Introduction To Python Programming
Python #2: Installing Python In Mobiles
Python #3: Installing Famous Python Editors Used For Core Programming
Variables and integers are something that stores data.
Variables are a - z
Integers are numbers that can be stored in data
Integers are whole numbers, natural numbers Etc.
Let’s see some examples of variables.
We can store some primary data in python using our variables.
Let us see how we can do it.
Let us take our data as the word ‘talentskillacademy’.
So the question is how to store it easily in python; let me show you.
Now first, we have to enter the variable in which we store our data.
Suppose we have taken the variable ‘a’ after entering our variable now; we should include the equal symbol ‘=’ as shown in the image below.
We have to enter our data in a single quote to be saved successfully, as shown below.
*it doesn’t matter whether you give space between the variable, = or the data*
Congratulation, you have stored your data in python using variables.
To check your data is successfully stored or not, we can just enter a simple command print(a) as shown below.
Now let’s run this command to check it.
Similarly, we can also store integers (numbers) as a data type. Let me show you an example.
As you can see, we have stored numbers and letters as data in our python using variables.
What are Variables
What are integers
How to store data in variables
How to print stored data
LinkedIn: Yaakulya Sabbani | Ethical Hacker, Bug Hunter
DM me if any queries or help required :) Thank you!
Instagram: Swaraj | Blogger
To explore more posts...
Contributions: Yasin (Technical Supporter & Content Creator)
Continued in series #4...
Comments