gurinder singhPro Student 1,422 Points
why it's not showing the result?
# EXAMPLES # squared(5) would return 25 # squared("2") would return 4 # squared("tim") would return "timtimtim" def squared (num): try: return int(num) ** int(num) except ValueError: return num * len(num)
Steven Parker133,975 Points
As Antonio pointed out, your math formula isn't quite right. You seem to have mixed the two different ways of squaring a number.
You could either multiply (one *) it by itself, or use the exponent operator (two **'s) with a second value of 2.