PCEP 30 02 PCEP Certified Entry Level Python Programmer · Free Practice Question Easy
Question 19
What is the output of the below code snippet?
- var = 25.6
- var = int(var)
- print(var)
-
A
25 -
B
25.0 -
C
26 -
D
25.6
Reveal correct answer
Correct answer: A
Explanation
The int() function will return the integer part which is 25.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
You must be logged in to post a comment.
