python programming for beginners to advanced Blog#2

Welcome back guys.. here is my 2nd post on python blog series. In my python blog#1 we wrote our first python code,  discussed what is a function and talked about print function and printing text on the console. 

This post is regarding variable printing to console -->

Now what is a variable ??💭💭
A variable is a name with a memory location(space) to store your values. Simply, if you are doing a maths addition problem you take two numbers as 'a' and 'b' and you add it . Here 'a' and 'b' are variables. 

Let us try this code now :

                a= 2
                b= 5
                sum =a +b 
                print(sum)

As described earlier , a variable will store some value in the memory. So a , b and sum will have some space allocated in memory and the Value inside these variables can be seen in console using print() function in python. Remember my previous post??👉Python Blog#1

If you like my blogs, please follow and share. Good Bye👍😊

Comments

Popular posts from this blog

python programming for beginners to advanced Blog#1