Question 142

What is the output of print(type(5 / 2))?

  1. A<class 'int'>
  2. B2.5
  3. C<class 'float'>
  4. D<class 'double'>
Show answerHide answer

Correct answer: (C) <class 'float'>

Explanation

/ always gives a float in Python 3.

From DSSSB TGT Computer Science Full Mock Test 5

This is question 142 of DSSSB TGT Computer Science Full Mock Test 5. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.