Pagina de inicio
/
Tecnología
/
The variable age is to be used to represent a person's age , in years. Which of the following is the most appropriate data type for age? square A B number C string D list

Problemas

The variable age is to be used to represent a person's age , in years. Which of the following is the most
appropriate data type for age?
square  A
B number
C string
D list

The variable age is to be used to represent a person's age , in years. Which of the following is the most appropriate data type for age? square A B number C string D list

Solución

avatar
Mariomaestro · Tutor durante 5 años
expert verifiedVerificación de expertos
3.6 (209 votos)

Responder

The most appropriate data type for representing a person's age in years is a number. Age is a numerical value that can be used in mathematical operations, so it should be stored as a number data type. Option A is not specified, so it cannot be considered. Option C, string, is not appropriate because age is not a text-based value. Option D, list, is also not appropriate because age is a single value, not a collection of values.<br /><br />Answer: B
Haz clic para calificar: