Ask Question

A python programmer is writing a function definition. What syntax should be used?

+5
Answers (1)
  1. 3 August, 02:35
    0
    Syntax of function in the Python Programming Language.

    def function_name ():

    '''body of the function or code'''

    #calling of the function

    function_name ()

    Note: In Python Programming Language, Indentation is sensitive if you not focus on the indentation then, you program occurs an indentation error.

    Explanation:

    In Python Programming language, we can use the "def" keyword to define a function then we write the name of the function and then use parentheses for the argument list. "#" is used for the single-line comment and " ''' ''' " is used for the multiple line comment.

    A function is the part or module of the program which provides users the feature of reusability of that code anywhere only by calling them.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “A python programmer is writing a function definition. What syntax should be used? ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers