PYTHON Variables MCQ

Python MCQ
  1. Home
  2. Tutorials
  3. Python
  4. Variables
  5. Multiple Choice Question

(1) In python programming which of the following is used for strong string in variable?

A) Single Quote
B) Double Quote
C) Angle Brackets
D) Both a and b

(2) In python if X is assigned value 10, then what will the output of this code print(type(x)).

A) <data_type 'int'>
B) <class 'int'>
C) <type 'int'>
D) <class 'integer'>

(3) Which of the following function is used for decimal type casting in python programming language?

A) float()
B) decimal()
C) toDecimal()
D) toFloat()

(4) Which of the following is not feature of python programming language?

A) High Level
B) In case Sensitive
C) Loosely Typed
D) Cross Platform

(5) Which of the following function is used for string casting in python programming?

A) toStr()
B) str()
C) string()
D) toString()

(6) In programming converting one data type into another type is called.

A) type changing
B) data type alteration
C) type casting
D) type modification

(7) Which of the following function can be used for getting data type of variable after variable defination?

A) typeof()
B) datatype()
C) type()
D) gettype()

(8) Which of the following is correct syntax of defining a variable in python programming ?

A) data type identifier = value
B) type identifier = value
C) identifier = value
D) identifier value

(9) Which of the following is automatically defined in python programming while defining a variable ?

A) Data type
B) Identifier
C) Value
D) None of these

(10) In python programming variables are defined without using.

A) Assignment statement
B) Data type
C) Identifier
D) Value
Comments
Login to TRACK of Comments.