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.
def square(number):
Adam N
Adam N
62,174 Points

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

1 Answer

def square(number): return number * number