What does the Real/Float data type store?

Study for the End of Year 8 Computer Science Test. Prepare with flashcards and multiple choice questions, each with hints and explanations. Get ready for your exam!

Multiple Choice

What does the Real/Float data type store?

Explanation:
Real/Float values are used to store decimal numbers—numbers that have a fractional part after the decimal point. This lets you represent measurements like 7.25, -0.5, or 123.456, which you can’t with whole numbers alone. They’re different from whole numbers (integers), which have no decimal part, and from text, which stores letters and symbols. In computers, these numbers are held using floating-point format, which means they’re stored with a certain precision and can be subject to tiny rounding errors because some decimals can’t be represented exactly in binary.

Real/Float values are used to store decimal numbers—numbers that have a fractional part after the decimal point. This lets you represent measurements like 7.25, -0.5, or 123.456, which you can’t with whole numbers alone. They’re different from whole numbers (integers), which have no decimal part, and from text, which stores letters and symbols. In computers, these numbers are held using floating-point format, which means they’re stored with a certain precision and can be subject to tiny rounding errors because some decimals can’t be represented exactly in binary.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy