menu search
brightness_auto
more_vert
3 1

What are the rules for the naming of variables and constants

Topic Python Programming - variables
Type Short Answer Type
Class 10
thumb_up_off_alt 3 like thumb_down_off_alt 0 dislike

1 Answer

more_vert
0
  1. Create a name that makes sense. Suppose, vowel makes more sense than v.
  2. Use camelCase notation to declare a variable. It starts with lowercase letter. For example: myName
  3. Use capital letters where possible to declare a constant. For example: PUse capital letters where possible to declare a constant. For example: PI
  4. Never use special symbols like !, @, #, $, %, etc.
  5. Constant and variable names should have combination of letters in lowercase or uppercase or digits or an underscore (_)

    Study more about Variables in Python at Variables in Python Class 10

thumb_up_off_alt 0 like thumb_down_off_alt 0 dislike

Related questions

thumb_up_off_alt 3 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 3 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 3 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 2 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 3 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 2 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 2 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 2 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 3 like thumb_down_off_alt 0 dislike
1 answer
thumb_up_off_alt 1 like thumb_down_off_alt 0 dislike
1 answer
...