Question #79149

In Python, indentation is used to indicate the extent of a block of code. What is the output of the following Python?
first = 3
second = 5
if first < second:
print ( “but this time” )
print ( “first is bigger” )

Expert's answer

Question #79149

In Python, indentation is used to indicate the extent of a block of code. What is the output of the following Python?


first = 3
second = 5
if first < second:
    print ("but this time")
    print ("first is bigger")


Answer:

The output will be an error as follow:

IndentationError: expected an indented block

There should be an indented line after if statement.

LATEST TUTORIALS
APPROVED BY CLIENTS