Предмет: Информатика, автор: av3411261

СРОЧНО, ПАЙТО!!!! ЧЕРЕПАШКА

Приложения:

Clock4323: Я сейчас это же задание делаю 0_0

Ответы

Автор ответа: Clock4323
1

# Python Program to draw a Y Fractal Tree in Turtle - Python  

from turtle import *  

 

speed('fastest')  

 

# Making the turtle facing upwards  

right(-90)  

 

# Using an acute angle btw  

# the base and the Y's branch  

angle = 30  

 

# method for plotting a Y  

def y(length, lvl):  

 

   if lvl > 0:  

         

       #altering the colour  

       #according to the current level  

       #by dividing the rgb range for green  

       #into equal intervals for each level.  

       pencolor('green')  

         

       # drawing the base  

       forward(length)  

 

       right(angle)  

 

       # calling recursion for  

       # the right subtree  

       y(0.8 * length, lvl-1)  

         

       pencolor('black')  

         

       left( 2 * angle )  

 

       # calling recursion for  

       # the left subtree  

       y(0.8 * length, lvl-1)  

         

       pencolor('green')  

         

       right(angle)  

       forward(-length)  

         

         

# Drawing the tree of length 40 and level 8  

y(40, 8)  

 

exitonclick()

hideturtle()  


av3411261: спасибо но это немного не то, нужно было как на рисунке(
Похожие вопросы
Предмет: Английский язык, автор: archifix
Короче потребую допомогу з англ.мови, тож допоможіть кому не складно:

1 Complete the text with which, who, where, whose.
John, 0 who turned eighteen last week, had a strange party. It was held in the planetarium 1 __________ they have special parties. Everything was dark even in the room 2 __________ we were in. We all had torches to see where we were going, but I still managed to fall over someone’s bag 3 __________ had been left on the floor. The person 4 __________ bag is was apologized for leaving it there, but I had hurt my leg and had to go to hospital. John’s parents, 5 __________ had organized the party, decided it was better to turn the lights on after that. Unfortunately the hospital 6 __________ they took me was quite far away so I missed the rest of the party, 7 __________ was a shame.

2 Complete the second sentence so that it means the same as the first. Use relative clauses.
0 He gave me this book for my birthday. That’s the book which he gave me for my birthday.
1 The shop is in London. I bought your present there.
The shop _______________________________ your present is in London.
2 I wrote that essay last night.
That’s the essay _____________________ __________ last night.
3 That band’s song is number one at the moment. That’s the band _____________________ __________ number one at the moment.
4 My dad was born in that village and we spent a few days there.
We spent a few days in the village _______________________________.
5 The author lives in that house next to ours. That’s the author ______________________ _________ next to ours.
6 The exhibition was held in the museum and one of my paintings was in it.
The exhibition, _______________________ ________, had one of my paintings in it.
7 The museum is closing next week. They held the exhibition here.
The museum, _______________________ ________, is closing next week.
8 My best friend is coming on holiday with us. His father is an artist.
My best friend, _____________________ __________, is coming on holiday with us.
Предмет: Українська мова, автор: kovalevskuy2011