Python defines a function with the def keyword. To maintain clarity and prevent ambiguity in the language, the keyword def is only used for function definitions. Syntax to define a function is:
def square(num):
"""
This function takes a num as input
and returns its square.
"""
return num * num
# Using the function
result = square(5)
print(f"The square of 5 is {result}")
# The f before the string indicates an f-string, which allows embedding
# variables directly in the string.
def