Python Variables & Identifiers
1.Which of the following will cause a syntax error?
-
A. x = 10
-
B. if x > 10:
-
C. print x
-
D. x == 10
print x
print x
2.Which of the following is a valid identifier in Python?
-
A. 2value
-
B. @name
-
C. first_name
-
D. class
first_name
first_name
3.What is the data type of the value True in Python?
-
A. str
-
B. int
-
C. bool
-
D. float
bool
bool
4.Which of the following is immutable in Python?
-
A. list
-
B. set
-
C. dictionary
-
D. tuple
tuple
tuple
5.Which one of these is not a standard Python data type?
-
A. int
-
B. float
-
C. array
-
D. bool
array
array