Python Python Basics Functions and Looping Create a Function

Dennis Dumbreni
Dennis Dumbreni
14,134 Points

square of a number

squaring.py
def Square(number):
     num = int(input("Enter an integer"))
int sqaure =num*num  
            print("The square of",num, "is",square)
              return square

1 Answer

Mark Sebeck
MOD
Mark Sebeck
Treehouse Moderator 26,462 Points

Hi Dennis. Nice try but you are over thinking it. Its only asking to make a function and return a value. You don't have to have the user enter anything. Also make sure you name the function square with a lowercase s. The challenge will test your function by calling it and if it can't find the correctly named function it won't pass even if the code is correct. Let me know if you need more help.