Which Python Keyword Indicates The Start Of A Function Definition?
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