Questions

2 Marks Each

🎯

Test yourself on this topic

13 questions · timed · auto-graded

Question 12 Marks
Rewrite the following python code after removing any/ all syntactical errors with each correction underlined:

View full question & answer
Question 22 Marks
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

 
View full question & answer
Question 52 Marks
Write a python function to print the number of the digits in number. The function digit() will take the number as parameter and the number of digits one, two, three or more than three digits.
View full question & answer
Question 62 Marks
Write a function, on calling it will calculate the factorial of the integer passed as a parameter, and return this factorial. The function will not display anything but will simply return the calculated result.
View full question & answer
Question 82 Marks
Rewrite the following code in python after removing all syntax error(s). Underline each correction done in the code.

View full question & answer
Question 132 Marks
What is the use of keyword global?
Answer
eyword global is used to:(i) Specify the global variable(s) which will be used in the function even if their values are changed in the function.
(ii) To create global variable(s) in the function.
View full question & answer
2 Marks Each - Computer Science STD 12 Science Questions - Vidyadip