Python Python Basics Functions and Looping Create a Function

Abdul haseeb
Abdul haseeb
569 Points

A doubt in Functions.

Create a function named square. It should define a single parameter named number.

In the body of the function return the square of the value passed in.

squaring.py
def square(number):
adam n
adam n
57,282 Points

That's a good start. Try making an attempt at the body.

1 Answer

Krishna B
Krishna B
30 Points

def square(number): return number * number