Oxford, Cambridge and RSA (OCR) GCSE Computer Science Practice Exam

Question: 1 / 400

Which of the following describes numbers that have a decimal part?

Integer

Float

The answer is B, Float, because a float (or floating-point number) is specifically designed to represent real numbers that include a decimal point. This allows for the storage and manipulation of numerical values that require precision beyond whole numbers, such as measurements or monetary values. Floats can represent values like 3.14 or -0.001, where the presence of the decimal indicates that they are not whole numbers.

Integers, on the other hand, are whole numbers without any decimal component, so they do not qualify under this definition. A Boolean type represents true or false values and does not pertain to numerical values at all. Strings are sequences of characters and can include letters, numbers, and symbols, but they do not perform numerical calculations in the same way as floats or integers. Therefore, float is the correct term for numbers that have a decimal part.

Get further explanation with Examzify DeepDiveBeta

Boolean

String

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy