NJENGA NJOKI’s Post

DAY 2: Understanding Identifiers in Python Yesterday we talked about variables. Today, let’s go one level deeper and understand identifiers — something many learners confuse. An identifier is simply the name we give to something in a Python program. It can be the name of: a variable a function or any object in Python Example: age = 10 Here: age is the identifier 10 is the value So, an identifier is not the value — it is the label or name used to access the value. Rules of Identifiers (very important) In Python: Identifiers cannot contain spaces They can use letters, numbers, and underscores (_) They cannot start with a number They are case-sensitive Valid identifiers: student_name age1 total_marks Invalid identifiers: 1age ❌ student name ❌ class ❌ (keyword) Why identifiers matter Good identifiers make your code: easier to read easier to teach easier to debug As a teacher, I always remind learners: Code is read more times than it is written. 🧩 Key takeaway A variable is made up of: an identifier (the name) a value (the data) If you name things well, Python becomes clearer and more powerful. #PythonBasics #Identifiers #ProgrammingEducation #LearnToCode #TeacherInTech #CodeWithClarity

  • graphical user interface, diagram

To view or add a comment, sign in

Explore content categories