COMPUTER PROGRAMMING FUNDAMENTALS
WHAT IS PROGRAMMING
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
True
|
|
False
|
|
Either A or B
|
|
None of the above
|
Detailed explanation-1: -"Constants can be declared with uppercase or lowercase, but a common convention is to use all-uppercase letters.” According to MDN: NOTE: Constants can be declared with uppercase or lowercase, but a common convention is to use all-uppercase letters."
Detailed explanation-2: -Detailed Solution Constant is an object whose value cannot be changed once defined for the design so option( 2) is not true.
Detailed explanation-3: -Because Python constants are just variables, both follow similar naming rules, with the only distinction being that constants use uppercase letters only. Following this idea, constants’ names can: Be of any length. Consist of uppercase letters ( A – Z )
Detailed explanation-4: -Named constants can only be declared with the CONSTANT statement; they cannot be assigned a name implicitly with an assignment statement. An assignment of a string constant produces a string variable rather than a named constant. All constants are assigned a class of UNSHARED.