+ 1

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
Waleed Dreadi - avatar
14 odpowiedzi
+ 1
# 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
+ 8
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
+ 3
Hanane Nadnassar , your answer has no relation to the current topic, so your post can be seen as spam.
29th Oct 2025, 10:03 PM
Lothar
Lothar - avatar
+ 2
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
+ 2
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
+ 2
Yaroslav Vernigora Now i got it think you
29th Oct 2025, 3:10 PM
Waleed Dreadi
Waleed Dreadi - avatar
+ 2
Ravindra Singh It appears that the links cannot be opened here.
30th Oct 2025, 4:28 AM
Waleed Dreadi
Waleed Dreadi - avatar
+ 1
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
Waleed Dreadi - avatar
+ 1
cmake_minimum_required(VERSION 3.13) project(hello LANGUAGES CXX) set(CMAKE_CXX_STANDARD 14) add_executable(main ${CMAKE_CURRENT_LIST_DIR}/src/main.cpp ${CMAKE_CURRENT_LIST_DIR}/src/functions.cpp) target_include_directories(main PRIVATE ${CMAKE_CURRENT_LIST_DIR}/include)
29th Oct 2025, 9:11 PM
Hanane Nadnassar
Hanane Nadnassar - avatar
+ 1
light_on=True door_locked=False Print(light_on or door_locked) Print(light_on and door_locked)
30th Oct 2025, 5:22 PM
Hachi Parmentier
Hachi Parmentier - avatar
+ 1
Yaroslav Vernigora ,I learned booleans,now I know, ON should be on ,and AND should be and,by original Yaroslav Vernigora (I am beginner in python,in 2nd on mercury leauge).
1st Nov 2025, 8:50 AM
anand ekawade
anand ekawade - avatar
+ 1
Anand, You're probably a little confused. I didn't mean the logical operators (not, or, and), but the direct values of boolean /True and False/. They are written with a capital letter and without quotation marks. In your previous advice, you recommended using quotation marks. This should not be done. You're misleading others. And by the way, where did you get the /on/ operator from? Be careful. Programs (codes) are very sensitive to even the slightest mistakes. https://www.geeksforgeeks.org/JUMP_LINK__&&__python__&&__JUMP_LINK/python-operators/?ysclid=mhg1z3wzjz700622387
1st Nov 2025, 8:58 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 1
# Code example with boolean values is_raining = True is_sunny = False print(is_raining) # Console out: True print(is_sunny) # Console out: False if is_raining: print("Please, take umbrella") else: print("You can go without umbrella") print('True' == True) #Out: False print(type(is_raining)) #Out: <class 'bool'> print(type(is_sunny)) # Out: <class 'bool'>
1st Nov 2025, 9:18 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar