FBISE, NCP & NBF-aligned resources for Classes 9–12

Computer 11th

Computer 11th Chap 3 : Topic 6.7

/15

Report a question

You cannot submit an empty report. Please add some details.

Computer Chapter 3 : Topic 6.7

Function Parameters and Arguments

1 / 15

Which statement correctly identifies the arguments in the following code?
$\mathbf{def\ multiply}\left( \mathbf{x,\ y} \right)\mathbf{:}$
$\mathbf{return\ x*y}$
$\mathbf{multiply(6,\ 4)}$

2 / 15

Which option correctly identifies the relationship between parameters and arguments?
$\mathbf{def\ average(a,\ b):}$
$\mathbf{return\ (a\ + \ b)\ /\ 2}$
$\mathbf{average(20,\ 40)}$

3 / 15

Which pair of identifiers represents the parameters in the following code?
$\mathbf{def\ add(first,\ second):}$
$\mathbf{return\ first + second}$
$\mathbf{add(15,\ 10)}$

4 / 15

A function accepts three values to calculate the volume of a cuboid. How many arguments are passed when the function is called?
$\mathbf{def\ volume(length,\ width,\ height):}$
$\mathbf{return\ length*width*height}$
$\mathbf{volume(5,\ 4,\ 3)}$

5 / 15

Which statement correctly describes the function parameters?
$\mathbf{def\ greeting():}$
$\mathbf{print("Welcome")}$

6 / 15

Which of the following values are considered the arguments?
$\mathbf{def\ maximum}\left( \mathbf{a,\ b} \right)\mathbf{:}$
$\mathbf{return\ max(a,\ b)}$
$\mathbf{maximum(18,\ 25)}$

7 / 15

Which option correctly identifies all parameters?
$\mathbf{def\ interest(principal,\ rate,\ time):}$
$\mathbf{return\ (principal*rate*time)\ /\ 100}$

8 / 15

Which statement best explains why the same function can produce different results?
$\mathbf{def\ cube(n):}$
$\mathbf{r}\mathbf{eturn\ n**3}$
$\mathbf{cube(2)}$
$\mathbf{cube(5)}$

9 / 15

Study the Python code below and identify the parameter used in the function definition.
$\mathbf{def\ greet(name):}$
$\mathbf{print("Hello",\ name)}$
$\mathbf{greet("Ali")}$

10 / 15

Examine the following Python code and identify the argument passed when the function is called.
$\mathbf{def\ square(number):}$
$\mathbf{return\ number*number}$
$\mathbf{square(5)}$

11 / 15

Which option correctly identifies both parameters and arguments from the following Python function code?
$\mathbf{def\ add(x,\ y):}$
$\mathbf{return\ x + y}$
$\mathbf{add(4,\ 7)}$

12 / 15

Analyze this Python program and select the option correctly identifying its parameter and argument.
$\mathbf{def\ display(city):}$
$\mathbf{print(city)}$
$\mathbf{place = "Lahore"}$
$\mathbf{display(place)}$

13 / 15

From the code below, which option correctly matches three parameters with their corresponding arguments?
$\mathbf{def\ student(name,\ age,\ grade):}$
$\mathbf{print(name,\ age,\ grade)}$
$\mathbf{student("Sara",\ 16,\ 11)}$

14 / 15

Identify the parameter receiving the second argument in the following Python function call correctly.
$\mathbf{def\ calculate(length,\ width):}$
$\mathbf{return\ length*width}$
$\mathbf{calculate(8,\ 3)}$

15 / 15

Examine the function below and determine which option correctly distinguishes parameters from variable arguments.
$\mathbf{def\ total(a,\ b):}$
$\mathbf{return\ a + b}$
$\mathbf{x = 10}$
$\mathbf{y = 20}$
$\mathbf{total(x,\ y)}$

Your score is

0%