nerdexam
CompTIA

FC0-U71 · Question #164

Which of the following is an example of a float data type?

The correct answer is A. -2.34. The question asks to identify a value that represents a float data type.

Software Development Concepts

Question

Which of the following is an example of a float data type?

Options

  • A-2.34
  • B0
  • C12
  • Dabc

How the community answered

(50 responses)
  • A
    88% (44)
  • B
    4% (2)
  • C
    2% (1)
  • D
    6% (3)

Why each option

The question asks to identify a value that represents a float data type.

A-2.34Correct

A float, or floating-point number, is a data type used to represent real numbers that have a fractional component. The value -2.34 explicitly contains a decimal point and a fractional part, clearly indicating it as a floating-point number.

B0

The number 0 is an integer, as it does not have a fractional part, though it could be represented as a float (0.0).

C12

The number 12 is an integer because it lacks any fractional or decimal component.

Dabc

The value 'abc' is a string data type, which represents textual information, not a numeric type.

Concept tested: Programming data types - float, integer, string

Source: https://www.w3schools.com/python/python_datatypes.asp

Topics

#Data types#Float data type#Programming fundamentals

Community Discussion

No community discussion yet for this question.

Full FC0-U71 Practice