184k views
1 vote
Look at the following function header: def my_function(a, b, c): Now look at the following call to my_function: my_function(3, 2, 1) When this call executes, what value will be assigned to a

User Asli
by
5.9k points

1 Answer

7 votes

Answer:

3 will be assigned to a

Step-by-step explanation:

Given

Function definition: def my_function(a, b, c)

Required

What is the value of a if the function is called as my_function(3, 2, 1)

First, we need to check if the function is rightly called.

myfunction is defined with three parameters a, b and c

myfunction is called with three arguments 3, 2 and 1

When called, the arguments will be assigned to each parameter in the order which they were declared.

This implies that:


a = 3


b = 2


c = 1

User Nam G VU
by
4.9k points