MCQ Answer

<p>Choose the correct function declaration of fun1() so that we can execute the following two function calls successfully.</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">fun1(25, 75, 55)<br>fun1(10, 20)</pre>

Choose the correct function declaration of fun1() so that we can execute the following two function calls successfully.

fun1(25, 75, 55)
fun1(10, 20)


fun1() का सही फंक्शन डिक्लेरेशन चुनें ताकि हम निम्नलिखित दो फंक्शन कॉल्स को सफलतापूर्वक निष्पादित कर सकें।

fun1(25, 75, 55)
fun1(10, 20)
Topic : Functions in Python

A. def fun1(**kwargs)

B. def fun1(args*)

C. No, it is not possible in Python

D. def fun1(*data)




Correct Answer is :

D. def fun1(*data)



Explanation

Hear we call function with two and 3 arguments , to pass variable length argument we use variable permeameter. hence def fun1(*a) is correct option because in this case we can pass variable length of arguments.

In Python, you can use the *args syntax to represent a variable-length argument list in a function. This allows a function to accept any number of positional arguments.

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz