This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-12-03 10:18:19

gbear605
Scratcher
Registered: 2008-03-06
Posts: 1000+

The Nth digit of pi

I need a block that gives the nth digit of pi.  Example:

Code:

[set (n) to 1]
[say ( ((n) digit of pi )) ]

would make the sprite say 3 (the first digit of pi). 

Code:

[set (n) to 2]
[say ( ((n) digit of pi )) ]

would make the sprite say 1 (the second digit of pi).

Possible to a point?

(obviously you couldn't program all of pi)


Yeah, I'm mostly inactive.  I check in once in a while though.  If you want to contact me, I have a contact form at my website, http://escratch.org

Offline

 

#2 2011-12-03 10:31:03

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: The Nth digit of pi

(letter n of 3.1415926535897922)

Just joking. Try something like this. By the way, I found this with a simple Google search.

-bobbybee (FireMMO Founder, FireMMO Owner, and FireMMO Lead Programmer [my sig, if you're wondering])


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#3 2011-12-03 10:40:28

gbear605
Scratcher
Registered: 2008-03-06
Posts: 1000+

Re: The Nth digit of pi

bobbybee wrote:

(letter n of 3.1415926535897922)

XD

Just realized this existed.

Last edited by gbear605 (2011-12-03 10:40:39)


Yeah, I'm mostly inactive.  I check in once in a while though.  If you want to contact me, I have a contact form at my website, http://escratch.org

Offline

 

#4 2011-12-03 10:43:17

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: The Nth digit of pi

Glad I could help  smile

-bobbybee (FireMMO Founder, FireMMO Owner, and FireMMO Lead Programmer [my sig, if you're wondering])


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#5 2011-12-03 11:49:32

scratcher7_13
Scratcher
Registered: 2011-02-09
Posts: 1000+

Re: The Nth digit of pi

bobbybee wrote:

(letter n of 3.1415926535897922)

Just joking. Try something like this. By the way, I found this with a simple Google search.

-bobbybee (FireMMO Founder, FireMMO Owner, and FireMMO Lead Programmer [my sig, if you're wondering])

That means that there is a pattern to pi.


♫ 90% of teens can't do math. If you are one of the 40% of teens who can, copy and paste this into your signature. ♫♪
http://dl.dropbox.com/u/6273449/BlockLibraryTitle.pnghttp://i.imgur.com/mr9Hf.gif

Offline

 

Board footer