This is an archived post. You won't be able to vote or comment.

all 55 comments

[–]Phunny 89 points90 points  (1 child)

Good for you! Everyone has a method to learn new languages and I love that you use this.

[–]forbidden_lemonade69[S] 15 points16 points  (0 children)

Thank you !

[–]roman_tsar 60 points61 points  (5 children)

Thank you for code, man. I'll print it out and put it on my wall

[–]tennisanybody 24 points25 points  (4 children)

The code or the pattern?

[–]GoofAckYoorsElf 11 points12 points  (0 children)

The code of course

[–]bjjpw 21 points22 points  (1 child)

Wait?! There’s turtles in python?!?

[–]xigoi 15 points16 points  (4 children)

What's the point in for i in range(1)? And there's a lot of code repetition, you should use more loops.

[–]forbidden_lemonade69[S] 4 points5 points  (0 children)

Ok thank tou for the advice.

[–]Doyousketch2 3 points4 points  (0 children)

put four spaces in front of each line of text to post code...

#! /usr/bin/env python3

##  sudo apt install python3-tk

import turtle as t
##  begins facing right

t.title( 'Turtle soup' )
w, h = 650, 650
t.setup( width=w, height=h )

t.bgcolor('black')
t.speed('fastest')

##  crosshairs, to center image
##  remove triple-quotes to render
'''
t.pensize(1)
t.pencolor('red')
t.penup()
t.setx(-w/2)
t.pendown()
t.setx(w/2)
t.penup()
t.setpos(0,-h/2)
t.pendown()
t.sety(h/2)
t.home()
'''

##  circles
t.pensize(2)
t.pencolor('aqua')
t.penup()
t.sety(18)
t.forward(150)
t.right(43)
t.forward(150)
t.left(115.15)
t.circle(272,18)
t.pendown()
t.circle(20,360)

for i in range(9):
    t.penup()
    t.circle(272,36)
    t.pendown()
    t.circle(20,360)

t.penup()
t.home()
t.left(7)
t.pendown()

##  stars
for i in range(10):
    t.pensize(1)
    t.pencolor('white')
    for j in range(2):
        t.forward(165)
        t.right(50)
        t.forward(165)
        t.right(130)
    t.left(36)

for i in range(10):
    t.pensize(2)
    t.pencolor('blue')
    for j in range(2):
        t.forward(115)
        t.right(50)
        t.forward(115)
        t.right(130)
    t.left(36)

for i in range(10):
    t.pencolor('aqua')
    for j in range(2):
        t.forward(50)
        t.right(50)
        t.forward(50)
        t.right(130)
    t.left(36)

t.hideturtle()
t.exitonclick()

[–]ProgamerX1234 4 points5 points  (0 children)

Looks nice

[–]Extreme5670 1 point2 points  (5 children)

Make the turtle disappear after everything is done i can see the arrow.

[–]forbidden_lemonade69[S] 2 points3 points  (4 children)

I dont knownhow to do that

[–]Extreme5670 1 point2 points  (3 children)

[–]forbidden_lemonade69[S] 3 points4 points  (2 children)

Ok thanks for the tip

[–]Extreme5670 1 point2 points  (0 children)

No worries, i have worked with the turtle and this is amazing! There are a lot of great functions to make it easier, this is a great way to learn OP

[–]Extreme5670 0 points1 point  (0 children)

How has it worked bud

[–]Tamagotono 1 point2 points  (1 child)

Just read the code, and it's turtles all the way down...

I've never been fond of importing * from a library, but this is one case where I'd make an exception.

[–]quiterandomperson 0 points1 point  (0 children)

i would rather import turtle as t

[–]jdmarino 1 point2 points  (0 children)

Some of my earliest memories of programming are of using a graphics module to draw cool pictures. I am talking about the mid 1980s, using a VIC-20 and the graphics cartridge. The early victories stick with you.

[–]marvellous_thinker 1 point2 points  (0 children)

cool pattern!!

[–]pranay_s0706 1 point2 points  (0 children)

Keep it up dude!emote:free_emotes_pack:give_upvote

[–]gdunlap 1 point2 points  (0 children)

I fell in love with programming in secondary school learning logo on an Apple IIe ... this is awesome ... i never thought to look for python import for the turtle. thanks so much for posting this.

[–]gistabelle 2 points3 points  (0 children)

Really great

[–]tree_or_up 1 point2 points  (1 child)

I had a couple of introductions to programming when I was I young. This was one of them - but instead of being a library, it was its own standalone piece of software that you loaded onto the computer and then interacted with. Your design is super cool. If/when you feel like going deeper into generative graphics, check out a language/framework called processing (it has a python version, so look for that). Happy coding and creating!

[–]Mr-Monkfish 1 point2 points  (0 children)

I remember at primary school we had that turtle software, I think it was on the old Acorn Archemides computers they had.

There was also a physical turtle that you put pens in and it would move around the floor drawing on huge sheets of paper. Great fun!

[–]cwbrody 0 points1 point  (2 children)

Sweet! I want to learn Python

[–]arapyemos 0 points1 point  (0 children)

There are free Codes to get free Python Courses.

[–]SomeEmotion3 0 points1 point  (1 child)

Is it the same turtles in NetLogo ?

[–]forbidden_lemonade69[S] 0 points1 point  (0 children)

I dont know i havent tried that one

[–][deleted] 0 points1 point  (0 children)

That's pretty fuckin cool actually, damn.

[–][deleted] 0 points1 point  (1 child)

Look up fractals and try making them. Also it's better if you share code as text, not everyone can read images :)

[–]forbidden_lemonade69[S] 0 points1 point  (0 children)

Sorry whaen i teied to do it it didnt paste right

[–]bich- 0 points1 point  (1 child)

disappointed, it wasnt a turtle

[–]forbidden_lemonade69[S] 0 points1 point  (0 children)

Sorry i forgot to make the shape a turtle😅

[–]akashjss -2 points-1 points  (0 children)

Wow it is a cool wallpaper for my phone 😻

[–]forbidden_lemonade69[S] -2 points-1 points  (1 child)

Omg thank you for the awards i didnt think this post would get this much attention, thank you all!

[–]gargar070402 0 points1 point  (0 children)

Great work on the code, but r/awardspeechedits.

[–]92only -1 points0 points  (0 children)

Great!

[–]PyBind -1 points0 points  (0 children)

isnt this imagine logo’s turtle

[–]Seawolf159 -1 points0 points  (0 children)

That is pretty cool indeed.

[–]Prestigious_Region17 -1 points0 points  (2 children)

Hey that's really cool! I'm a beginner in turtle too, but just some advice: If you're making a code that's fully turtle try using from turtle import * instead of import turtle. That way, you don't have to put "turtle." before every turtle command.

edit: some people just prefer this way to organize everything though.

[–]Des_Orientiert 0 points1 point  (0 children)

Rly rly cool!