Function Parameter
Function with parameter
# This function should return the area of a circle when given the appropriate
# parameter Pi * r ** 2
PI = 3.142 # a constant, meaning that you should not change it [but of course can be changed eventually]
def area_of_a_circle(radius):
result = PI * radius ** 2
return result
area = area_of_a_circle(3)
print(area)Working with default parameters
Working with arguments (*args)
Working with keyword arguments (**kwargs)
Last updated