Boolean Operators | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Boolean Operators

I dont understand why 'True and False' are considered correct as boolean operators yet 'true and false' is not. Can someone please explain to me why this is so?

3rd Apr 2020, 7:46 PM
Mashiloane Phomelelo
Mashiloane Phomelelo - avatar
2 ответов
+ 1
Because they are keywords, and keywords as identifiers (variable names, function names...) are case sensitive ^^ So, True and False exists, but not true and false (until you define them explicitly: true = True; false = False :P)
3rd Apr 2020, 7:53 PM
visph
visph - avatar
0
Thank you
30th Apr 2020, 10:06 PM
Mashiloane Phomelelo
Mashiloane Phomelelo - avatar