- Which of the following functions is a built-in function in python?
- random()
- sqrt()
- factorial()
- print()
- What is the area of memory called, which stores the parameters and local variables of a function call?
- a heap
- storage area
- an array
- None of these
- Is it necessary to use return statement inside a function? (Yes / No)
- print() is a:
- Keyword
- Identifier
- User-Defined Function
- built-in function
- stdout(), stdin(), stderr() are available in which module:
- os
- sys
- python default
- io
- What is the area of memory called, which stores the parameters and local variables of a function call?
i) a heap
ii) storage area
iii) an array
iv) None of these - What is the output of the following code :
1 2 3 4
a = 1 def f( ): a = 10 print(a)
- Can a function return multiple values? How?
- When a global statement is used? Why is its use not recommended?
- Write a Python program to have the following features:
- A function that takes a number as an argument and calculates a cube for it. The function does not return a value.
- If there is no value passed to the above-created function i.e. 10(a) in the function call, the function should calculate the cube of 2.
- A function that takes two char arguments and returns True if both arguments are equal
No comments:
Post a Comment