Question
What is default argument? Explain with help of an example.

Answer

A default argument is a value provided in function header (declaration) which is automatically assigned by the interpreter if the caller of the function does not provide a value for the argument with a default value.
For example

 

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free

Similar questions

A text file “Quotes.Txt” has the following data written in it: "Living a life you can be proud of Doing your best Spending your time with people and activities that are important to you Standing up for things that are right even when it’s hard Becoming the best version of you." Write a user defined function to display the total number of words present in the file.
Define programming error and Not supported errors.
What are the best case and worst case in sorting techniques?
Write a program to create the list and do the following operations using the predefined functions.

• To print sum of all element of the list• To find maximum element of the list• To find minimum element of the list• To find the length of the list• To sort the list in ascending order• To sort the list in descending order

What is Data Aggregation?
Write a program to read and display the content of the "multiline.txt". [Filename: ch4/ch-4_Q11]
Write a program using recursive function to accept the number from the user and print sum of first even n natural numbers.
Give one suitable example of each – URL and Domain Name.  
Write a python program to draw the bar chart for the given data: month = ['January', 'February', 'March', 'April', 'May',
'June', 'July', 'August', 'September', 'October', 'November', 'December']

Avetmp=[9.0,15.0,22.0,30.4,36.7,40.8,42.7,45.6,44.7,42.8,38.5,30.7,7.0]

Which of the following crime(s) is/are covered under cybercrime? [Delhi 2013]

(a) Stealing brand new hard disk from a shop

(b) Getting into unknown person’s social networking account and start messaging on his behalf.

(c) Copying some important data from a computer without taking permission from the owner of the data.