English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

What are the points to be noted while defining a function? - Computer Science

Advertisements
Advertisements

Question

What are the points to be noted while defining a function?

Short Note

Solution

  1. Function blocks begin with the keyword “def ” followed by the function name and parenthesis ( ).
  2. Any input parameters or arguments should be placed within these parentheses when you define a function.
  3. The code block always comes after a colon (:) and is indented.
  4. 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
  Is there an error in this question or solution?
Chapter 7: Python functions - Evaluation [Page 113]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 12 TN Board
Chapter 7 Python functions
Evaluation | Q 8. | Page 113
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×