1. Home
  2. Data Science
  3. Python
  4. Which of the following methods is used to retrieve the…

Added 4 May 2024

Which of the following methods is used to retrieve the fractional and integer parts of a float separately?

  1. frac()
  2. modf() Correct answer
  3. fraction()
  4. split()

Correct answer

B. modf()

14 views

MCQSEXAM

Explanation

The modf() method returns the fractional and integer parts of a float as a tuple.

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs