1. Home
  2. Data Science
  3. Python
  4. Which of the following is a valid float in Python?

Added 4 May 2024

Which of the following is a valid float in Python?

  1. 10
  2. -5.6 Correct answer
  3. '3.14'
  4. [1, 2, 3]

Correct answer

B. -5.6

16 views

MCQSEXAM

Explanation

Floats can represent both positive and negative numbers with decimal points. -5.6 is a valid float.

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