Logical Operators - Quiz

1. What is the output of the following Python code snippet?

if True or False: print("Yes") else: print("No")
None
Yes
Error
No

2. In Python, what does the following code print?

if not True: print("A") elif not (1 + 1 == 3): print("B") else: print("C")
C
B
A
Error

Log in or sign-up to access the quiz



Don't have a login?

You can still revise this topic