- python is dynamically typed language because
a. It doesn’t care of data type of variable being declared.
b. It uses indentation for defining blocks
c. Some python code can be written into another languages such as C,C++
d. Python code can be run on any platform
Show Answer
a. It doesn’t care of data type of variable being declared.
- The data type of a variable is decided by Python at
a. Runtime
b. Compile time
c. Both
d. None
Show Answer
a. Runtime
- Which of the following data type is not supported by python
a. Float
b. Complex
c. List
d. date
Show Answer
d. date
- To determine the data type of a variable ________ is used.
a. dtype()
b. type()
c. cast()
d. ndim()
Show Answer
b. type()
- which of the following is not a keyword in python?
a. eval
b. def
c. del
d. pass
Show Answer
a. eval
- The data type of given statement would be
x = 12.78
a. int
b. float
c. string
d. bool
Show Answer
b. float
- The data type of given statement would be
flag = False
a. int
b. float
c. string
d. bool
Show Answer
d. bool
- The data type of given statement would be
degree = “37.6”
a. int
b. float
c. string
d. bool
Show Answer
c. string
- The data type of given statement would be
S = [12, 3.45, ‘san’]
a. List
b. Tuple
c. String
d. Sequence
Show Answer
a. List
- The data type of given statement would be
T = (‘Int’, 34, 8.9)
a. List
b. Tuple
c. String
d. Sequence
Show Answer
b. Tuple
- Executing following code will return
qty = -12.34
type(qty)
a. <class ‘Int’>
b. <class ‘float’>
c. <class ‘signed’>
d. <class ‘neg float’>
Show Answer
b.
- Which of the following is not a Python Sequence?
a. List
b. Tuple
c. String
d. Dictionary
Show Answer
d. Dictionary
- In python, Ordered collection of items, where each item is indexed by an integer value is called
a. Set
b. Sequence
c. Mapping
d. Array
Show Answer
b. Sequence
- Which of the following is immutable data type?
a. String
b. List
c. Tuple
d. Both a and c
e. All of the above
Show Answer
d. Both a and c
- To represent the’ volume of cylinder’ which data type will be used?
a. int
b. float
c. complex
d. string
Show Answer
b. float
- To represent the’ Address of employees’ which data type will be used?
a. Int
b. Float
c. Complex
d. String
Show Answer
d. String
- To represent the’ mobile number’ which data type will be used?
a. Int
b. Float
c. Complex
d. String
Show Answer
a. Int
- To represent the’ Indian or not’ which data type will be used?
a. Int
b. Float
c. String
d. Bool
Show Answer
d. Bool
- To enclose items, tuple uses
a. [ ]
b. ( )
c. { }
d. “ ”
Show Answer
b. ( )
- Which of the following delimiter is used by list to enclosed items?
a. [ ]
b. ( )
c. { }
d. “ “
Show Answer
a. [ ]
- String uses ____ to enclose items
a. “ “
b. ‘ ‘
c. ()
d. Both a and b
e. All
Show Answer
d. Both a and b
- Executing following code will return
X=2, Y = 5
X+=X**Y
Print(X)
a. 12
b. 32
c. 34
d. 1024
Show Answer
c. 34
- Find the output of given code
X=2
Y=3
X = Y+C
Print(X)
a. 0
b. 3
c. Error
d. No output
Show Answer
c. Error
- What will be output of given code?
A = 4
print(A+’M’)
a. 4
b. 4M
c. Error
d. No Output
Show Answer
c. Error
- Which of the following statement is correct?
a. 4+2 = X
b. Is = ‘X’+3
c. L = ‘a’**’b’
d. Sum = 3.67//2
Show Answer
d. Sum = 3.67//2