Python Basic Quiz #8 – Conditionals & Boolean Values

Python basic Quiz. 5 Questions. Difficulty Level: Easy to Moderate. Concept: Conditional Statements, Operators, Boolean Values

Hello Everyone! Welcome to the Short Quiz on Python Conditional Statements, Operators & Boolean Values.

This Quiz is made with questions from Operators. To learn about operators please check the Operators tutorial and Conditional Statements.

This Quiz contains of 5 simple questions. After completing the Quiz, immediately you will get the results displayed with correct answers.

Please feel free to provide your feedback in the comments box in bottom of the page.

Happy Programming!

Welcome to your Python Basic Quiz #8 - Conditionals & Boolean values

1. 
What will be the output of the below code?

print("Start")
if((4 < 5) or (4 == 5)):
  print("Success")
print("End")

2. 
What will be the output of the below code?

print(1)
if(True & False):
  print(2)
print(3)

3. 
Fill in the correct operators in the blank place.

x = 10
if x __ 0:
  print("Value is greater than 0.")
elif x __ 0:
  print("Value is less than 0.")
else:
  print("Value is Zero.")

4. 
What will be the output of the below code?

print(1)
if(False == False):
  print(2)
print(3)

5. 
Which of the following code is not correct?

Other Quizzes you may like:

Asha Ponraj
Asha Ponraj

Data science and Machine Learning enthusiast | Software Developer | Blog Writter

Articles: 86

Leave a Reply

Your email address will not be published. Required fields are marked *