Python Variables & Rules

๐Ÿ  | เค†เคธाเคจ เคนिंเคฆी เค”เคฐ English เคฎें |

Welcome to another step in your Python journey!
Today, we’ll learn about variables — the containers that hold data — and the basic rules you must follow when writing Python code.


๐Ÿ”ค What Are Variables? | Variables เค•्เคฏा เคนोเคคे เคนैं?

English:
Variables are names that store values. Think of them like labeled boxes where you can keep your data.

เคนिंเคฆी:
Variables เคตो เคจाเคฎ เคนोเคคे เคนैं เคœिเคจเคฎें เค†เคช เค•ोเคˆ เคตैเคฒ्เคฏू (เคกेเคŸा) เคธ्เคŸोเคฐ เค•เคฐ เคธเค•เคคे เคนैं। เคœैเคธे เคเค• เคกिเคฌ्เคฌा เคœिเคธเคฎें เค†เคช เค•ुเค› เคฐเค– เคธเค•เคคे เคนैं।


๐Ÿงช Example of a Variable | Variable เค•ा เค‰เคฆाเคนเคฐเคฃ

name = "Rahul"
age = 25
is_student = True

English:
Here, name, age, and is_student are variables storing a string, number, and boolean value.

เคนिंเคฆी:
เคฏเคนाँ name, age, เค”เคฐ is_student เคคीเคจ variables เคนैं เคœो string, number เค”เคฐ boolean เคตैเคฒ्เคฏू เค•ो เคธ्เคŸोเคฐ เค•เคฐ เคฐเคนे เคนैं।


๐Ÿ“‹ Basic Rules for Variables in Python | Python เคฎें Variables เค•े เคจिเคฏเคฎ

RuleEnglish Explanationเคนिंเคฆी เคฎें เคธเคฎเค
✅ Must start with a letter or underscore _You can’t start with a numberเคจंเคฌเคฐ เคธे เคถुเคฐू เคจเคนीं เคนो เคธเค•เคคा
✅ Can contain letters, numbers, and underscoresSpaces are not allowedเคธ्เคชेเคธ เคจเคนीं เคนोเคจा เคšाเคนिเค
❌ Cannot use Python keywordsWords like if, for, class are reservedPython เค•े keywords เค‡เคธ्เคคेเคฎाเคฒ เคจเคนीं เค•เคฐ เคธเค•เคคे
✅ Case-sensitiveName and name are differentเค›ोเคŸे-เคฌเคก़े เค…เค•्เคทเคฐ เค…เคฒเค— เคฎाเคจे เคœाเคคे เคนैं

๐Ÿง  Good Variable Naming Tips | เค…เคš्เค›े Variable เคจाเคฎ เคฐเค–เคจे เค•े เคŸिเคช्เคธ

  • Use meaningful names: score, user_name, total_amount
  • Avoid single letters like x, y unless for math
  • Use snake_case for multi-word names: user_age, product_price

๐ŸŽฏ Final Thoughts | เค†เค–़िเคฐी เคฌाเคค

English:
Variables are the foundation of any program. Learn to name them well and follow the rules — it’ll make your code clean and easy to understand.

เคนिंเคฆी:
Variables เค•िเคธी เคญी เคช्เคฐोเค—्เคฐाเคฎ เค•ी เคจींเคต เคนोเคคे เคนैं। เค‡เคจ्เคนें เคธเคนी เคจाเคฎ เคฆेเคจा เค”เคฐ เคจिเคฏเคฎों เค•ा เคชाเคฒเคจ เค•เคฐเคจा เคœ़เคฐूเคฐी เคนै เคคाเค•ि เค•ोเคก เคธाเคซ़ เค”เคฐ เคธเคฎเคเคจे เคฎें เค†เคธाเคจ เคนो।



Comments

Popular posts from this blog

O-Level M1 + M2 Test Paper | NIELIT Practice

Introduction to Python Programming in IDLE: Beginners Guide | Python เคชเคฐिเคšเคฏ

IoT Part 3: How Smart Devices Talk (Communication Models)