R

Ram Sharma • 3.40K Points
Extraordinary

Q. What is the result of calling this function?

Code:
def divide(x, y):
return x / y

print(divide(10, 2))
  • (A) 5
  • (B) 5.0
  • (C) 10/2
  • (D) None
  • Correct Answer - Option(B)
  • Views: 20
  • Filed under category Python
  • Hashtags:

Explanation by: Ram Sharma

10 divided by 2 is 5.0 (float result from division).

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.