Python MCQs with Explanation

What do we use to define a block of code in Python language?

  1. { } Brackets
  2. semicolon
  3. Indentation
  4. None of these



Answer: 
Option c: Indentation

Unlike languages like C, C++, or Java that use curly braces {} to enclose blocks of code, Python uses indentation to determine the grouping of statements. Indentation helps establish the structure and hierarchy of the code and is a fundamental part of the Python syntax.

Post a Comment

0 Comments