Advertisements
Advertisements
प्रश्न
What are the points to be noted while defining a function?
टीपा लिहा
Advertisements
उत्तर
- Function blocks begin with the keyword “def ” followed by the function name and parenthesis ( ).
- Any input parameters or arguments should be placed within these parentheses when you define a function.
- The code block always comes after a colon (:) and is indented.
- The statement “return [expression]” exits a function, optionally passing back an expression to the caller. A “return” with no arguments is the same as a return None.
shaalaa.com
Introduction to Python Functions
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
APPEARS IN
संबंधित प्रश्न
A Function which calls itself is called as ______
Which function is called anonymous un-named function?
While defining a function which of the following symbol is used.
What is a function?
How to set the limit for recursive function? Give an example.
Explain the different types of functions with an example.
Write a Python code to find the L.C.M. of two numbers.
Explain the following built-in function.
id()
Explain the following built-in function.
chr()
Explain the following built-in function.
type()
