#2 print function | variables in python | python program execution | python for beginners

preview_player
Показать описание
You can get all the codes used in this tutorial from

#Why comments are important
To increase readability
Comments are used to make the code easy to understand. If the programmer who has written the code needs to refer to the code, later on, he can use comments. If another programmer wants to go through the code, he may find it difficult to understand it. Comments aid in understanding the code.
To add programmers signature
If multiple programmers are working on the same code they can use comments to describe their portions of code, code addition, and last updation date.

#Rules of variable declaration.
A variable can have a short name (like x and y) or a more descriptive name (age, car_name, total_volume). Rules for Python variables:
A variable name must start with a letter or the underscore character
Correct: Age, _name, ageIn2020
Incorrect: 2020Age
A variable name cannot start with a number
Incorrect: 2020Age
A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )
Incorrect: Age$
Variable names are case-sensitive (age, Age, and AGE are three different variables)
Means two variables (age) and (Age) is different
Рекомендации по теме