0

Where is the error

light_on=True door_locked=False Print(light_on OR door_locked) Print(light_on AND door_locked)

28th Oct 2025, 7:23 PM
Waleed Dreadi
5 Réponses
+ 6
Hi! Please, write: print -> not Print or and -> not OR AND Python is case sensitive language
28th Oct 2025, 7:44 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 1
The strings are not having quotation marks on both side and like the first post,Print should be print and use snake case (_) on all spaces,hope this will solve your problem! (python is a case sensitive language,like the first post said,the orignal is Yaroslav Vernigora ).
29th Oct 2025, 4:05 AM
anand ekawade
anand ekawade - avatar
0
Anand, True and False is not strings. This is Boolean values. And the result of the logical union /and or/ is also a Boolean value. This part of the program is correct.
29th Oct 2025, 4:55 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
Yaroslav Vernigora Yaroslav vernigora Hi! Please, write: print -> not Print or and -> not OR AND Python is case sensitive language Can you explain that further
29th Oct 2025, 8:36 AM
Waleed Dreadi
0
# What exactly do you not understand? #the program should look like this: light_on=True door_locked=False print(light_on or door_locked) print(light_on and door_locked)
29th Oct 2025, 8:51 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar