menu

Python Control Structures

Python Control Structures - Important Points


6. Which statement is used to skip the current iteration of a loop in Python?

A. break

B. continue

C. pass

D. skip

Discuss Work Space

Answer: option b

Explanation:

The continue statement is used to skip the current iteration of a loop in Python.

7. Which of the following is not a comparison operator in Python?

A.

B.

C. <=

D. :=

Discuss Work Space

Answer: option d

Explanation:

:= is the walrus operator in Python, which is used to assign a value to a variable as part of an expression.

8. Which operator is used to check if two values are equal in Python?

A. =

B. ==

C. ===

D. !=

Discuss Work Space

Answer: option b

Explanation:

The == operator is used to check if two values are equal in Python.

9. Which operator is used to check if two values are not equal in Python?

A. =

B. ==

C. ===

D. !=

Discuss Work Space

Answer: option d

Explanation:

The != operator is used to check if two values are not equal in Python.

10. Which of the following is not a logical operator in Python?

A. and

B. or

C. not

D. nor

Discuss Work Space

Answer: option d

Explanation:

nor is not a logical operator in Python.


Subscribe for Latest Career Trends
Subscribe Now
Use AI and ChatGPT for Career Guidance

Unlock Your Future

Join Now
Worried for Placements in 2024?

Join FAST TRACK Course

Join Now
Supercharge Your SUCCESS

Join All in One Placement Mock Tests-2024

Join Now