Search Header Logo
Python- Function (Parameter, Argument and Return)

Python- Function (Parameter, Argument and Return)

Assessment

Presentation

Computers

12th Grade

Medium

Created by

Tshering Tshering

Used 51+ times

FREE Resource

14 Slides • 4 Questions

1

media

PARAMETER,

ARGUMENT AND

RETURN

2

media

PARAMETER

IN PYTHON FUNCTION

3

media

Parameters

A parameter is the variable listed inside

the parentheses in the function definition.

Here, a and b is the function parameter.

4

media

Default Parameter
A default parameter is set when the default

value is already assigned when defining a
function.

Output

5

media

ARGUMENT

IN PYTHON FUNCTION

6

media

Arguments

Arguments are specified after the

function name, inside the parentheses.

When we call the function, the value passed
(10 & 20) to the parentheses is called the
function’s arguments.

7

media

}

The number 10 and 20 will be passed to a and b in
the function parameter respectively.
And later it was passed to the function body/
statement.

8

media

Parameter Vs Argument

Parameter is the variable you give to function

when you define the function.

When the function is called the argument(s)

are the data you pass into the function
parameter.

Argument is the actual value of the variable

that gets passed to the function.

9

​Quiz Time.

Get ready

10

Multiple Choice

Parameter is the variable you give to function.

1

True

2

False

3

None of the above.

11

Multiple Choice

How many parameters can we use in each function?

1

1

2

2

3

5

4

As many as we need

12

Fill in the Blanks

Type answer...

13

Multiple Choice

What is the correct way to create a function in Python?

1

def myFunction():

2

function myFunction():

3

Create myFunction():

4

DEF myFunction():

14

media

RETURN

IN PYTHON FUNCTION

15

media

o Return statement is used to end the

execution of the function call and returns
the result.

o The statement after the return statement

is not executed.

o Return statement can not be used outside

the function.

Return statement

16

media

Example

Output

17

media

Output

18

media

Activity

1. Write a python code to find
Area of a Rectangle using function and passing
parameter and argument.

2. Write a python code to find
Area of a Square using function and passing
parameter and argument.

media

PARAMETER,

ARGUMENT AND

RETURN

Show answer

Auto Play

Slide 1 / 18

SLIDE