Python; Variables - PART 2



by 
    Aneesh R. Prabhu


Variables.

 A Python variable is a reserved memory location to store values. In other words, a variable in a python program gives data to the computer for processing.



Different data types in Python are Numbers, List, Tuple, Strings, Dictionary, etc. Variables can be declared by any name or even alphabets like a, aa, abc, etc

*The above code is executed in Thonny.


In the code above first_name is declared as scinodium and last_name is declared  as python.

Follow further articles for print command.


Variable names can be of your choice as mentioned in the above picture.

Note: Variables cannot start with a number or a special character.

Example:   "1name" is an invalid variable but "name1" is a valid variable.


Feel free to comment down your queries.

Thank you!




Comments

  1. This too is a good information but, instead of picking out specific topics, maybe you should teach people the complete procedure of how it works, how you are supposed to code in Python in different languages etc... That will be really useful for people who do not know coding at all. What you are writing is for people who are Intermediate coders who might just know how to code but still want to know more about coding before they can start making stuff. And, I am sure that there area lot more of beginner / people who don't know how to code.

    ReplyDelete
    Replies
    1. Hey buddy!
      The tutorials are written in a specific order and variables is a important part in the upcoming topic ... that’s the reason we thought of covering it at the first. Stay tuned!

      Thank you! Aneesh R. Prabhu :)

      Delete

Post a Comment

Popular posts from this blog

Python; Introduction and Installation -PART 1

A second home: Mars

Python; Print Command- PART 3