#sqroot.py #Compute the square root of a postive value entered by the #user. The extracted value is examined to make sure it is #positive. If not, the absolute value is first computed. import math # Extract a value from the user. value = int( raw_input( "Enter a value: " ) ) # Determine if it's negative. If so, make it positive. if value < 0 : print "The value is negative. Converting to positive." value = abs( value ) # Compute the square root of the number. sqroot = math.sqrt( value ) # Print the results. print "The square root of ", value, " is ", sqroot