Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
themaniac

python lesson help

Recommended Posts

Posted · Original PosterOP

so i'm a bit confused, i've been going through my lessons but i cant figure anything out maybe i'm being an idiot, all i have left in this to do is finish the comments but i cant figure out what exactly it means maybe i'm just being an idiot, if so can someone help me not be one

# This program draws 

from turtle import *

# bgcolor() changes the background color
bgcolor("lightblue")
color("darkgreen")
shape("turtle")
penup()
# The crawl variable is used to 
crawl = 10
# The turn variable is used to
turn = 35

for i in range(50):
    # stamp() is used to 
    stamp()
    # With each loop, crawl is 
    crawl = crawl + 3
    # The crawl variable controls the 

forward(crawl)
right(turn)

exitonclick()

 


Spoiler

My system is the Dell Inspiron 15 5559 Microsoft Signature Edition

                         The Austrailian king of LTT said that I'm awesome and a funny guy. the greatest psu list known to man DDR3 ram guide

                                                                                                               i got 477 posts in my first 30 days on LinusTechTips.com

 

Link to post
Share on other sites

I think they mean that you need to finish the comments, since they're not full sentences :P


Basic guide to CPU's!

If I said I were 14, you would call me a kid. If I say 70, you’ll entitle me too old. If I say 20 you say I’m inexperienced and if I say 40 than I'm too boring.

龴 ͡ↀ ◡ ͡ↀ龴#locked( ͡͡ ° ͜ ʖ ͡ °)

Link to post
Share on other sites
Posted · Original PosterOP
1 minute ago, Stijncat said:

I think they mean that you need to finish the comments, since they're not full sentences :P

i know that what i meant was what crawl and stamp() meant, that is what is confusing me


Spoiler

My system is the Dell Inspiron 15 5559 Microsoft Signature Edition

                         The Austrailian king of LTT said that I'm awesome and a funny guy. the greatest psu list known to man DDR3 ram guide

                                                                                                               i got 477 posts in my first 30 days on LinusTechTips.com

 

Link to post
Share on other sites
1 hour ago, themaniac said:

i know that what i meant was what crawl and stamp() meant, that is what is confusing me

Crawl presumably means the turtle moves and stamp should be it drawing a dot or something on the screen.

So each time this for loop is executed (50 times) the turtle will draw a dot, then it will exit the loop and move the turtle forward by whatever the new crawl variable is (10 + 50 * 3) and turn right by turn, which is still 35.

 

I think the formatting of the code you wrote here isn't properly tabbed, so in the case that the move forward and turn right were inside the for loop it would draw a spiral that is getting larger.

Link to post
Share on other sites

If you need help with the turtle library, read this :

http://openbookproject.net/thinkcs/python/english3e/hello_little_turtles.html

It's very basic and should help you out.


i5 4670k @ 4.2GHz (Coolermaster Hyper 212 Evo); ASrock Z87 EXTREME4; 8GB Kingston HyperX Beast DDR3 RAM @ 2133MHz; Asus DirectCU GTX 560; Super Flower Golden King 550 Platinum PSU;1TB Seagate Barracuda;Corsair 200r case. 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×