Conditions: if, then, else - Learn Python 3 - Snakify

Lesson 3. Conditions: if, then, else




4/15. Carthage must be indented correctly

In this program we removed the indentation, and now the code crashes. Please, restore the indentation to make it correct and runnable again.


x = int(input())
if x > 0:
    # Put four spaces or press <Tab> in the beginning of this line:
print(x)  
else:
    # And here:
print(-x)