Use app×
QUIZARD
QUIZARD
JEE MAIN 2026 Crash Course
NEET 2026 Crash Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
206 views
in Computer by (49.6k points)
closed by

What are the identifiers in programming languages?

1 Answer

+1 vote
by (51.9k points)
selected by
 
Best answer

In programming languages, identifiers are names used to identify a variable, function, or other entities in a program. 

The rules for naming an identifier in Python are as follows: 

• The name should begin with an uppercase or a lowercase alphabet or an underscore sign (_). This may be followed by any combination of characters a–z, A–Z, 0–9 or underscore (_). Thus, an identifier cannot start with a digit. 

• It can be of any length. (However, it is preferred to keep it short and meaningful). 

• It should not be a keyword or reserved word given in Table. 

• We cannot use special symbols like !, @, #, $, %, etc., in identifiers. 

For example, to find the average of marks obtained by a student in three subjects, we can choose the identifiers as marks1, marks2, marks3 and avg rather than a, b, c, or A, B, C. 

avg = (marks1 + marks2 + marks3)/3 

Similarly, to calculate the area of a rectangle, we can use identifier names, such as area, length, breadth instead of single alphabets as identifiers for clarity and more readability. 

area = length * breadth

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...