A

Admin • 832.27K Points
Coach

Q. What is the output of the following code?

Code:
print(type(10/2))
  • (A) <class 'int'>
  • (B) <class 'float'>
  • (C) <class 'double'>
  • (D) <class 'number'>
  • Correct Answer - Option(B)
  • Views: 17
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

Division in Python always returns a float, even if numbers divide evenly.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.