FC0-U71 Applications and Software Practice Question
A developer writes a Python script that processes user input. During execution, the script prompts for an age and stores it in a variable. Which data type is most appropriate for the variable that stores the age?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Integer
Age is typically a whole number, so an integer (int) is the most appropriate data type. Python's int can store whole numbers without decimals.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Float
Why it's wrong here
Float is for decimal numbers; age is usually an integer.
- ✗
Boolean
Why it's wrong here
Boolean is for true/false values, not for age.
- ✗
String
Why it's wrong here
String is for text; while age could be stored as a string, it would prevent numeric operations.
- ✓
Integer
Why this is correct
Correct. Age is a whole number; integer is the best choice.
Go deeper
Related to this question
About these practice questions
Courseiva writes every FC0-U71 question from scratch — 988 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This FC0-U71 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the FC0-U71 exam.