Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

you created a pen as an instance of turtle. which line of code draws wi…

Question

you created a pen as an instance of turtle. which line of code draws with blue and fills with red?
color(red,blue)
color(blue,red)
pen(red,blue)
pen(blue,red)

Explanation:

Brief Explanations

In the turtle module, the color() function is used to set the pen color (for drawing) and the fill color. The first argument is the pen color (drawing color), and the second argument is the fill color. So to draw with blue (pen color) and fill with red (fill color), we use color('blue','red'). The pen() function is not used for setting colors in this context.

Answer:

color('blue','red') (the option with color('blue','red') is the correct one)