PCEP 30 02 PCEP Certified Entry Level Python Programmer · Free Practice Question Easy
Question 11
What is the output:
- print(1 // 2)
- print(6. // -4)
-
A
- 0
- -2.0
-
B
- -1.0
- -1.0
-
C
- 1
- -1.0
-
D
- 0
- -1.0
Reveal correct answer
Correct answer: A
Explanation
Floor division(//) returns the integer part smaller than or equal to the actual number.
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.
