Home / CSE MCQs / Python MCQs :: Discussion

Discussion :: Python MCQs

  1. What is the output of the following?

    for i in range(float('inf')):
        print (i)
  2. A.
    0.0 0.1 0.2 0.3 "¦
    B.
    0 1 2 3 "¦
    C.
    0.0 1.0 2.0 3.0 "¦
    D.
    none of the mentioned

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    Error, objects of type float cannot be interpreted as an integer.


Be The First To Comment