Which Python Keyword Indicates The Start Of A Function Definition?
![which python keyword indicates the start of a function definition?](https://pythonpoint.net/wp-content/uploads/2020/12/which-python-keyword-indicates-the-start-of-a-function-definition_-1024x576.jpg)
The keyword that indicates the start of a function definition is def.
Keyword def
marks the start of the function header. It is followed by name of the function.
#def keyword marks the start of the function def calculate(x, y): if x%2 == 0: return x + y else: return x * y #calling the userdefined function using the function name print(calculate(2, 5)) print(calculate(3, 5))
Output:
7 15
Subscribe
Login
Please login to comment
0 Discussion