Data Types And Numeric Types — Part 1 MCQs with Explanations
Practice high-yield Programming & Software Development MCQs on Data Types And Numeric Types — Part 1 with worked academic solutions for FPSC, PPSC, NTS, NITB, PTS.
Questions
40
Difficulty Level
Exam-Level
Target Exams
FPSC, PPSC, NTS...
Estimated Time
48 mins
Exam-Level FPSC PPSC NTS NITB PTS
Verified for Commission Syllabus • Oct 14, 2026
40
Verified Practice Questions
Interactive test mode with detailed academic worked solutions
Live Progress|0/40 answered
✓0 correct
✗0 wrong
0% score
🎉 Set complete! All 40 questions answered.
Question 1 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following is a valid data type in Python?
Correct Answer: Option A — int
Detailed Academic Explanation:
The data type for integers in Python is int.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 2 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of type(3.14) ?
Correct Answer: Option A — float
Detailed Academic Explanation:
The type() function returns the data type of the argument.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 3 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What data type is used to represent a sequence of characters in Python?
Correct Answer: Option D — str
Detailed Academic Explanation:
The data type for sequences of characters in Python is str.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 4 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the purpose of the str() function in Python?
Correct Answer: Option D — To convert a number to a string
Detailed Academic Explanation:
The str() function converts a number or other data type to a string.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 5 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of type(True) ?
Correct Answer: Option B — bool
Detailed Academic Explanation:
The data type for boolean values in Python is bool.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 6 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
How do you create a floating-point number in Python?
Correct Answer: Option A — 5.0
Detailed Academic Explanation:
Floating-point numbers can be created using the decimal point notation, like 5.0.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 7 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of int(3.9) ?
Correct Answer: Option A — 3
Detailed Academic Explanation:
The int() function converts a floating-point number to an integer by truncating the decimal part.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 8 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the data type of the result of 10 / 2 ?
Correct Answer: Option B — float
Detailed Academic Explanation:
Division of two integers results in a floating-point number.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 9 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
How do you convert a string containing an integer to an integer data type?
Correct Answer: Option A — int("5")
Detailed Academic Explanation:
The int() function converts a string containing an integer to an integer.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 10 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following is not a numeric data type in Python?
Correct Answer: Option C — str
Detailed Academic Explanation:
str is a string data type, not a numeric data type.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 11 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of complex(3, 4) ?
Correct Answer: Option C — 3 + 4i
Detailed Academic Explanation:
The complex() function creates a complex number in the form real + imaginary.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 12 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the purpose of the round() function in Python?
Correct Answer: Option D — To round a number to a specified number of decimal places
Detailed Academic Explanation:
The round() function rounds a number to a specified number of decimal places.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 13 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of 5 + 3.0 ?
Correct Answer: Option B — 8.0
Detailed Academic Explanation:
When an integer and a floating-point number are added, the result is a floating-point number.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 14 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of "5" + "3" ?
Correct Answer: Option D — "53"
Detailed Academic Explanation:
The + operator concatenates strings, so "5" + "3" results in "53".
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 15 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of 5 // 2 ?
Correct Answer: Option B — 2
Detailed Academic Explanation:
The // operator performs floor division, resulting in the quotient without the fractional part.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 16 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the imaginary part of the complex number 3 + 4j ?
Correct Answer: Option B — 4
Detailed Academic Explanation:
The imaginary part of a complex number is the coefficient of the imaginary unit j.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 17 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of int(3.999) ?
Correct Answer: Option A — 3
Detailed Academic Explanation:
The int() function converts a floating-point number to an integer by truncating the decimal part.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 18 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the data type of the result of "True" ?
Correct Answer: Option B — str
Detailed Academic Explanation:
The result of "True" is a string, not a boolean.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 19 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of abs(3 + 4j) ?
Correct Answer: Option C — 5
Detailed Academic Explanation:
In Python, the abs() function returns the magnitude (modulus) of a complex number. A complex number is written in the form a + bj , where a is the real part and b is the imaginary part. The magnitude of a complex number is calculated using the formula √(a² + b²) . For the complex number 3 + 4j : Real part = 3 Imaginary part = 4 Magnitude = √(3² + 4²) = √(9 + 16) = √25 = 5 . Therefore, abs(3 + 4j) returns 5 . Hence, the correct answer is Option C: 5 .
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 20 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of divmod(10, 3) ?
Correct Answer: Option A — (3, 1)
Detailed Academic Explanation:
The divmod() function returns the quotient and remainder of division.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 21 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of len("Hello, World!") ?
Correct Answer: Option A — 13
Detailed Academic Explanation:
The len() function returns the length of a sequence, such as a string.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 22 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of int("5") + float("2.5") ?
Correct Answer: Option A — 7.5
Detailed Academic Explanation:
The int() and float() functions convert strings to the respective numeric types.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 23 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of round(3.14159, 2) ?
Correct Answer: Option A — 3.14
Detailed Academic Explanation:
The round() function rounds a number to a specified number of decimal places.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 24 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the purpose of the complex() function in Python?
Correct Answer: Option A — To create complex numbers
Detailed Academic Explanation:
The complex() function is used to create complex numbers in Python.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 25 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of (3 + 4j) * (1 - 2j) ?
Correct Answer: Option C — -1 - 10j
Detailed Academic Explanation:
Complex multiplication involves distributing and combining real and imaginary parts.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 26 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of float("3.14") ?
Correct Answer: Option C — 3.14
Detailed Academic Explanation:
The float() function converts a string containing a number to a floating-point number.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 27 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of these in not a core data type?
Correct Answer: Option D — Class
Detailed Academic Explanation:
Class is the correct answer to “Which of these in not a core data type”. This question is standard in competitive examination syllabi for Data Types And Numeric Types.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 28 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Given a function that does not return any value, What value is thrown by default when executed in shell.
Correct Answer: Option D — None
Detailed Academic Explanation:
None is the correct answer to “Given a function that does not return any value, What value is thrown by default when executed in shell.”. This question is standard in competitive examination syllabi for Data Types And Numeric Types.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 29 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
In order to store values in terms of key and value we use what core data type.
Correct Answer: Option D — dictionary
Detailed Academic Explanation:
dictionary is the correct answer to “In order to store values in terms of key and value we use what core data type.”. This question is standard in competitive examination syllabi for Data Types And Numeric Types.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 30 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the type of inf?
Correct Answer: Option C — Float
Detailed Academic Explanation:
Float is the correct answer to “What is the type of inf”. This question is standard in competitive examination syllabi for Data Types And Numeric Types.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 31 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Which of the following results in a SyntaxError?
Correct Answer: Option C — 3'
Detailed Academic Explanation:
3' is the correct answer to “Which of the following results in a SyntaxError”. This question is standard in competitive examination syllabi for Data Types And Numeric Types.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 32 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the average value of the following Python code snippet? >>>grade1 = 80 >>>grade2 = 90 >>>average = (grade1 + grade2) / 2
Correct Answer: Option A — 85.0
Detailed Academic Explanation:
85.0 is the correct answer to “What is the average value of the following Python code snippet? >>>grade1 = 80 >>>grade2 = 90 >>>average = (grade1 + grade2) / 2”. This question is standard in competitive examination syllabi for Data Types And Numeric Types.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 33 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What does ~4 evaluate to?
Correct Answer: Option A — -5
Detailed Academic Explanation:
-5 is the correct answer to “What does ~4 evaluate to”. This question is standard in competitive examination syllabi for Data Types And Numeric Types.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 34 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the output of print 0.1 + 0.2 == 0.3?
Correct Answer: Option B — False
Detailed Academic Explanation:
False is the correct answer to “What is the output of print 0.1 + 0.2 == 0.3”. This question is standard in competitive examination syllabi for Data Types And Numeric Types.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 35 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
The following is displayed by a print function call. Select all of the function calls that result in this output. tom dick harry
Correct Answer: Option C — print(‘tom\ndick\nharry’)
Detailed Academic Explanation:
print(‘tom\ndick\nharry’) is the correct answer to “The following is displayed by a print function call. Select all of the function calls that result in this output. tom dick harry”. This question is standard in competitive examination syllabi for Data Types And Numeric Types.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 36 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of cmp(3, 1)?
Correct Answer: Option A — 1
Detailed Academic Explanation:
1 is the correct answer to “What is the result of cmp(3, 1)”. This question is standard in competitive examination syllabi for Data Types And Numeric Types.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 37 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What will be the output of the following Python code? >>>str="hello" >>>str[:2] >>>
Correct Answer: Option A — he
Detailed Academic Explanation:
he is the correct answer to “What will be the output of the following Python code? >>>str="hello" >>>str[:2] >>>”. This question is standard in competitive examination syllabi for Data Types And Numeric Types.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 38 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What does ~~~~~~5 evaluate to?
Correct Answer: Option A — +5
Detailed Academic Explanation:
+5 is the correct answer to “What does ~~~~~~5 evaluate to”. This question is standard in competitive examination syllabi for Data Types And Numeric Types.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 39 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What data type is the object below? L = [1, 23, 'hello', 1]
Correct Answer: Option A — list
Detailed Academic Explanation:
list is the correct answer to “What data type is the object below? L = [1, 23, 'hello', 1]”. This question is standard in competitive examination syllabi for Data Types And Numeric Types.
💡Key Conceptual Anchor:Data Types And Numeric Types
Question 40 of 40
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the result of round(0.5) - round(-0.5)?
Correct Answer: Option D — Value depends on Python version
Detailed Academic Explanation:
Value depends on Python version is the correct answer to “What is the result of round(0.5) - round(-0.5)”. This question is standard in competitive examination syllabi for Data Types And Numeric Types.
💡Key Conceptual Anchor:Data Types And Numeric Types
✓Link copied to clipboard
Continue Your Practice
Advance Html — Part 1
Master the next curriculum module with 40 exam-standard MCQs.
💡Examiner's Advisory for Programming & Software Development
In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.