+ 3

Why True and False have to be capitalized and "true and false" is a wrong answers

Booleans capitalization

2nd Apr 2019, 8:34 PM
thelablive2
thelablive2 - avatar
8 Antworten
+ 8
Python is case sensitive.
2nd Apr 2019, 9:12 PM
Hubert Dudek
Hubert Dudek - avatar
+ 5
True and False in Python are capitialised because they are constants and it is common practice to capitialise constants in Python. Other languages with similar naming practices tend not to follow it for whatever reason. The language is also case sensitive meaning true and True are different according to Python.
2nd Apr 2019, 10:25 PM
TurtleShell
TurtleShell - avatar
+ 4
Not just them, any other variables too for example thelablive2 != Thelablive2. Python is case sensitive.
3rd Apr 2019, 5:25 AM
Dan Rhamba
Dan Rhamba - avatar
+ 3
They are builtin keywords Means they already described in the python language Its depend upon python creator how defined them in his language and , you have to use them as they defined it is like a rule In py 'F'alse and 'T'rue Like in for loop you use for keyword that how these are defined
3rd Apr 2019, 4:54 AM
Tony Stark
Tony Stark - avatar
+ 1
@Dan Booleans are states and not variables
3rd Apr 2019, 9:40 AM
thelablive2
thelablive2 - avatar
0
Must be due to the reason that they are case sensitive
8th Apr 2019, 3:23 AM
Mohit Poudel
Mohit Poudel - avatar
0
Python is case-sensitive. Moreover, they are keywords that are built in into the Python language. Python programming language defines certain keywords that have to be used as they are defined. We simply have to follow the syntax rules of that language.
29th Jun 2022, 5:44 AM
Alex | Python Instructor & Solutionist Thinker
Alex | Python Instructor & Solutionist Thinker - avatar