PYTHON If Statement MCQ

Python MCQ
  1. Home
  2. Tutorials
  3. Python
  4. If Statement
  5. Multiple Choice Question

(1) Which of the following will invert the result of relational expression?

A) AND
B) OR
C) NOT
D) XOR

(2) If both conditions are TRUE then it will return TRUE.

A) AND
B) OR
C) NOT
D) XOR

(3) which operator is used with multiple conditions in if statement?

A) Assignment
B) Logical
C) Arithmetic
D) Unary

(4) How many conditions can be used with single if statement?

A) One
B) Two
C) Four
D) Multiple

(5) In python programming if statements are written after ________ tabs.

A) One
B) Two
C) Three
D) Four

(6) Statement or set of statements are executed only if provided relational expression is.

A) TRUE
B) FALSE
C) NEUTRAL
D) EQUAL

(7) In python which of the following operator is used after condition of if statement?

A) Semicolon (;)
B) Comma (,)
C) Colon (:)
D) Dot (.)

(8) In python which of the following keyword is used to implement selection structure?

A) if
B) condition
C) sel
D) select
Comments
Login to TRACK of Comments.