menu

Python Control Structures

Python Control Structures - Important Points


16. Which keyword is used to define a block of code in Python?

A. block

B. segment

C. suite

D. module

Discuss Work Space

Answer: option c

Explanation:

In Python, a block of code is defined using a suite, which is a group of statements that are indented together.

17. Which statement is used to create a list in Python?

A. [ ]

B. ( )

C. { }

D. | |

Discuss Work Space

Answer: option a

Explanation:

The [ ] brackets are used to create a list in Python.

18. Which statement is used to create a dictionary in Python?

A. [ ]

B. ( )

C. { }

D. | |

Discuss Work Space

Answer: option c

Explanation:

The { } brackets are used to create a dictionary in Python.

19. Which statement is used to create a tuple in Python?

A. [ ]

B. ( )

C. { }

D. | |

Discuss Work Space

Answer: option b

Explanation:

The ( ) parentheses are used to create a tuple in Python.

20. Which statement is used to create a set in Python?

A. [ ]

B. ( )

C. { }

D. | |

Discuss Work Space

Answer: option c

Explanation:

The { } brackets are used to create a set 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