Report Bug

Qus: <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>

Qus<p style="font-size: 12.6px; letter-spacing: 0.14px;">fun1() का सही फंक्शन डिक्लेरेशन चुनें ताकि हम निम्नलिखित दो फंक्शन कॉल्स को सफलतापूर्वक निष्पादित कर सकें।</p><pre>fun1(25, 75, 55)<br>fun1(10, 20)</pre>


A. def fun1(**kwargs)
B. def fun1(args*)
C. No, it is not possible in Python
D. def fun1(*data)


Solution
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.

Latest Current Affairs 2026 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test , CCC MCQ Python Coding Tutorials Best Computer Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Website development Company in Allahabad