Report Bug

Qus

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

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

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


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 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2024 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