I'm trying to recreate a piece of code that I've found on Non-Programmer's Tutorial for Python 2.6-(Page 29):
n = input("Number?")
if n < 0:
print "The absolute value of", n, "is", -n
else:
print "The absolute value of", n, "is", n
But the output is different than I spected. If I put as input "-5" I received as output "-5", not "5".I don't know exactly what is the problem with that. This is my piece of code: http://www.codeskulptor.org/#user40_ULW5rdd4VSQXxss.py