93.4k views
1 vote
A python programmer is writing a function definition. What syntax should be used?

2 Answers

4 votes

Answer:

def functionName( arguments ):

statement1

statement2

statement3

Step-by-step explanation:

User Arunas
by
7.7k points
2 votes

Answer:

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.

Step-by-step 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.

User Vaysage
by
8.3k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.