What will be the output of the following Python code? [code]import turtle t=turtle.Pen() t.clear() t.isvisible()[/code]

What will be the output of the following Python code?
Code:
import turtle
t=turtle.Pen()
t.clear()
t.isvisible()
A. Yes
B. True
C. No
D. False
 
Answer: b
Explanation: The function t.clear() returns a blank canvas, without changing the position of the turtle. Since the turtle is visible on the blank canvas, the output of this code is: Yes.
 

Tìm kiếm

Back
Top