darshani45 darshani45
  • 25-02-2021
  • Computers and Technology
contestada

help!! write the python code

help write the python code class=

Respuesta :

tonb
tonb tonb
  • 25-02-2021

Answer:

import turtle

t = turtle.Turtle()

t.speed(0)

t.pendown()

colours = ["yellow", "blue", "red", "orange", "cyan", "pink", "green", "brown"]

for x in range(1,10):

 t.pencolor(colours[x%len(colours)])

 for i in range(4):

   t.forward(20*x)

   t.right(90)

Explanation:

I made it such that you can add or remove as many colours as you want in the array, if there are more lines than colours it starts at the beginning again.

Answer Link

Otras preguntas

In an informative research essay on the technology used during Civil War battles, which of the following domain-specific terms would LIKELY be used? broadside p
given f(x)=3x-2 and g(x)=-1/3x +2/3, determine if g(x) and f(x) are inverse functions?
Methane, CH4, can be used as fuel in an automobile to reduce pollution. What is the coefficient of oxygen in the balanced equation for the reaction? __CH4(g) +
NEED TO FIND intercepts. PARALLEL y = ¾ x -1 (4, 0)
: How does the founder of Wikipedia keep a tight reign on accuracy? HELP PLEZ AT LEAST A PARGRAPH PLES
what is the multiplicative identity of the complex number –3 + 5i
what are some of the psychological stages of healing following on injury
factor the expression. 30-4n
how can adding doubles help you multiply by 2? give an example
Choose all answer that are correct Which equation are equations for the line shown A y-3=-1/2(x-4) B y-4=1/2(x-3) C y-3=1/2(x+1) D y-1=1/2(x+3) The points to