0

Python cycles - is there a more simple way?

Hello guys, I just started to learn how to code in Python, so I am total beginner. I am following Solo learn app and some basics course on one website in my language (czech). I just came across cycles and turtle module. There was an extra task in the course, to draw 6 hexagons in circle to get kind of flower picture, using cycles and simplest code as I can. So I created this - https://code.sololearn.com/ccEgi5crbMow - and my question is, is there a more simple way to create this? I mean less lines of code or something? But please be aware, that I don't know any difficult functions yet, just these in the code + print, input, etc., which are not related now. Thank you very much in advance.

16th Dec 2018, 1:32 PM
Jiƙí Kiner
Jiƙí Kiner - avatar
2 Answers
+ 2
Hi Jiƙí Kiner I think turtle is the simplest way to draw any shape. To draw any shape, some for loops and directions are needed.
16th Dec 2018, 4:35 PM
Popat
Popat - avatar
+ 1
Hi Archana. Thanks for the answer, but that is not what I was asking for. The thing is that I am already using turtle, which you can see in the code. I was just asking if there is more simple solution for my code, using turtle (which I am), to get the output I already have, but written in more simple way. To optimize the code or how to say it. Thanks.
16th Dec 2018, 5:22 PM
Jiƙí Kiner
Jiƙí Kiner - avatar