Python Python Basics Functions and Looping Create a Function

How do I write this function?

def square("a number multiplied by itself") number = ("5") print("number * Number") print("25")

squaring.py
def square("a number multiplied by itself")
number = ("5")
print("number * Number")
print("25")

1 Answer

Duc Bui
Duc Bui
14,545 Points
def square(number):
  return number*number

Number = 5
print(square(Number))