MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

ALGORITHMS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
A constant is normally written in lower case.
A
True
B
False
C
Either A or B
D
None of the above
Explanation: 

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: -By Convention: Variable names begin with a lowercase letter, and class names begin with an uppercase letter. If a variable name consists of more than one word, the words are joined together, and each word after the first begins with an uppercase letter, like this: isVisible .

Detailed explanation-3: -Detailed Solution Constant is an object whose value cannot be changed once defined for the design so option( 2) is not true.

Detailed explanation-4: -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 )

There is 1 question to complete.