Advertisements
Advertisements
Question
State True or False.
“Variable declaration is implicit in Python.”
Options
True
False
Solution
This statement is True.
Explanation:
Assigning a value to a variable without specifying its type is called an implicit declaration.
Example:
- x = 5
- x = "five"
Python supports the implicit declaration of variables. So, the given statement is true.
APPEARS IN
RELATED QUESTIONS
Observe the following program carefully, and identify the error:
mynum = 9
def add9():
mynum = mynum + 9
print mynum
add9() #function call
Using an example showing how a function in Python can return multiple values.
Differentiate between the following with the help of an example:
Global and Local variable
"Identifiers are names used to identify a variable or function in a program".
Consider the code given below:
b=100
def test(a):
______________ # missing statement
b=b+a
print (a,b)
test (10)
print (b)
Which of the following statements should be given in the blank for #Missing Statement, if the output produced is 110?