From kirby.urner at gmail.com Mon Dec 3 04:22:27 2012
From: kirby.urner at gmail.com (kirby urner)
Date: Sun, 2 Dec 2012 19:22:27 -0800
Subject: [Edu-sig] more in the "Rich Data Structure" series
Message-ID:
"""
Quantum Field Theory:
Skeletal draft of objects
Rich Data Series
To help with studies, students learning Python might bend its
notation to help them wrap their heads around this and that.
Here's a module I've been working on after listening to
Sean Carroll's ISEPP lecture in Portland last night (isepp.org).
Write-up:
http://worldgame.blogspot.com/2012/11/isepp-physics-lecture.html
I haven't double checked everything as the primary idea is
to get across the idea. People will role their own. These are
more in the way of doodles at this point, minus much of
anything to hold it together. Slapping it out there as open
source.
If you fix a broken bit, fork a new version,
take it as inspiration to start from scratch, feel free to
add your name to the list of contributors. Many of you have
already. My thanks to the Wikipedia articles and other
authors I read and/or listened to or otherwise appreciated.
Other Rich Data Structure stuff
http://mail.python.org/pipermail/edu-sig/2005-November/005533.html
http://www.mail-archive.com/edu-sig at python.org/msg02457.html
http://mybizmo.blogspot.com/2008/01/rich-data-structures.html
K. Urner
edu-sig
"""
ANTI = True
class Fermion():
"""fractional spin, Fermi-Dirac statistics"""
spin = 1/2 # J
class Boson():
"""whole number spin, Bose-Einstein statistics"""
spin = 0 # may override in subclass to 1 or 2 (Higgs)
class Field:
pass
class Strong(Field):
"""
quantum chromodynamics
"""
def __init__(self, anti=False):
self.anti = anti
if anti:
self.color = "anti-" + self.color # reverse color if anti-particle
class ElectroWeak(Field):
"""
quantum electrodynamics
"""
def __init__(self, anti=False):
self.anti = anti
if anti:
self.charge = -self.charge # reverse charge if anti-particle
# Quarks: 6 with oppositely charged pairs = 12, each with 3 colors =
36 permutations
class Quark(Fermion, Strong, ElectroWeak):
"""
Meson = Quark + Quark
Baryon = Quark + Quark + Quark (e.g. proton, neutron)
"""
def __init__(self, color, anti=False):
color = color.lower()
if color not in ["blue", "red", "green"]:
raise ValueError
Strong.__init__(self, anti)
ElectroWeak.__init__(self, anti) # reverse charge if anti
class Up(Quark):
mass = 2.4 # m Mev/c2
charge = 2/3 # Q
class Down(Quark):
mass = 4.4
charge = -1/3
class Charm(Quark):
mass = 1320
charge = 2/3
class Strange(Quark):
mass = 87
charge = -1/3
class Top(Quark):
mass = 172700
charge = 2/3
class Bottom(Quark):
mass = 4240
charge = -1/3
# Gauge Bosons
class W(Boson, ElectroWeak):
mass = 80387
charge = 1
spin = 1
class Z(Boson, ElectroWeak):
mass = 91187.6
charge = 0
spin = 1
class Photon(Boson, ElectroWeak):
mass = 0
charge = 0
class Gluon(Boson, Strong):
spin = 1 # overrides attribute of Boson
mass = 0
charge = 0
def __init__(self, color, anticolor):
self.color = coler
self.anticolor = anticolor
# Higgs Boson
class Higgs(Boson):
spin = 2 # overrides attribute of Boson
mass = 125000
charge = 0
# Leptons (6 + 6 anti = 12)
class Electron(Fermion, ElectroWeak):
mass = 0.511
charge = -1
class Tau(Fermion, ElectroWeak):
mass = 1776.82
charge = -1
class Muon(Fermion, ElectroWeak):
mass = 105.7
charge = -1
# masses are superpositional
class Neutrino_E(Electron):
mass = .0022
charge = 0
class Neutrino_T(Tau):
mass = 0.17
charge = 0
class Neutrino_M(Muon):
mass = 15.5
charge = 0
# Hadrons (composed of 2 or 3 quarks, or "exotic" if more (not confirmed)
class Baryon(Fermion, Strong, ElectroWeak):
pass
class Nucleon(Baryon):
"""Baryon -- one of two kinds of Hadron"""
class Proton(Nucleon):
"""
Up("blue") + Up("red") + Down("green")
Proton() + Electron() -> Neutron() + Neutrino_E()
"""
mass = 938.27
charge = 1
class Neutron(Nucleon):
"""
Down("green") + Down("red") + Up("blue")
Neutron() -> Proton() + Electron() + Neutrino_E(ANTI)
"""
mass = 939.57
charge = 0
class Sigma(Baryon):
"""
Have two Ups or two Downs, and one something else (charm, strange,
bottom, top -- tops are too fast)
"""
pass
class Omega(Baryon):
"""
Have no Up or Down quarks
"""
class Lambda(Baryon):
"""
One Up, One Down, and one something else
"""
class Xi(Baryon):
"""
One up or down + two heavier quarks
"""
class Delta(Baryon):
"""
up and down quarks only, spin 3/2 vs. nucleon 1/2
Decay into nucleon + pion in short order
"""
mass = 1232
class Meson(Boson, Strong, ElectroWeak):
""" Meson -- the other kind of Hadron besides Baryon
Unstable. Charged -> electrons + neutrinos, Uncharged -> photons
Flavorless (quarkonium): quark + anti-quark of same type
Flavorful: quark + anti-quark of different type
"""
class D(Meson):
"""Flavorful with charm"""
class B(Meson):
"""Flavorful with charm"""
class Upsilon(Meson):
"""Flavorless with bottom (bottomonium, a form of quarkonium)"""
mass = 9460
spin = 1
class JPsi(Meson):
"""Flavorless with charm (excited charmonium)"""
pass
class Pion(Meson):
"""
Up() + Down(ANTI) charge = 1 --> 99.9877% Muon(ANTI) +
Neutrino_M(), .0123% Electron(ANTI) + Neutrino_E
Up() + Up(ANTI) or Down() + Down(ANTI) charge = 0
Down() + Up(ANTI) charge = -1 --> 99.9877% Muon() +
Neutrino_M(ANTI), .0123% Electron() + Neutrino_E(ANTI)
"""
mass = 139.57 # if charged, else 135
parity = -1
class Rho(Meson):
mass = 770
class Phi(Meson):
"""
Flavorless with strange
"""
mass = 1019.4
charge = 0 # 3 states
class Kaon(Meson): # K Mesons
"""
Four types
Flavorful: Strange() + Up() or Down()
"""
charge = 1
mass = 493.7 if charge == (1 or -1) else 497.6
class Eta(Meson):
charge = 0
From kirby.urner at gmail.com Mon Dec 3 07:27:50 2012
From: kirby.urner at gmail.com (kirby urner)
Date: Sun, 2 Dec 2012 22:27:50 -0800
Subject: [Edu-sig] Thoughts about upgrading our python.org page
Message-ID:
Proposal to upgrade:
http://www.python.org/community/sigs/current/edu-sig/
Probably it's time to mention some new projects. Examples:
http://www.pythontutor.com/
http://www.skulpt.org/
http://www.raspberrypi.org/
http://arduino.cc/playground/Interfacing/Python
That's not meant to be an exhaustive list. I notice there's no
mention of Sugar, which is old news by now:
http://wiki.laptop.org/go/Sugar
Note that all of these are on the same level.
Ipython
http://ivory.idyll.org/blog/teaching-with-ipynb-2.html
Fitting all these into a new narrative might take awhile.
I think edu-sig would be a great page on which to exercise diplomacy
in the sense of linking to similar pages devoted to other languages.
We are sympathetic to Mathematica, not averse. Also to J and Haskell,
no question. These are great projects, open or no.
We do advertise the advantages of open without apology, but that
doesn't require withholding admiration for some closed source
projects. We're not bigots.
Kirby
From roberto03 at gmail.com Mon Dec 10 09:45:15 2012
From: roberto03 at gmail.com (roberto)
Date: Mon, 10 Dec 2012 09:45:15 +0100
Subject: [Edu-sig] Codecademy
Message-ID:
Hello, is there anyone who gave a try to
http://www.codecademy.com/tracks/python ?
What do you think about it ?
I'd like to start using it with a few youngster passioned about coding.
Thank you.
--
Roberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From roberto03 at gmail.com Mon Dec 10 12:36:44 2012
From: roberto03 at gmail.com (roberto)
Date: Mon, 10 Dec 2012 12:36:44 +0100
Subject: [Edu-sig] Codecademy
In-Reply-To:
References:
Message-ID:
Does it run on iPads too ?
On Monday, December 10, 2012, Aakash Prasad wrote:
> Hi Roberto,
>
> Give LearnStreet a try! We are newer but we've gotten feedback from users
> indicating our courses are better than CodeCademy's and Udacity's.
>
> Thanks
>
> Aakash
> On Dec 10, 2012 12:51 AM, "roberto" >
> wrote:
>
>> Hello, is there anyone who gave a try to
>> http://www.codecademy.com/tracks/python ?
>>
>> What do you think about it ?
>> I'd like to start using it with a few youngster passioned about coding.
>>
>> Thank you.
>>
>> --
>> Roberto
>>
>> _______________________________________________
>> Edu-sig mailing list
>> Edu-sig at python.org
>> http://mail.python.org/mailman/listinfo/edu-sig
>>
>>
--
Roberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jurgis.pralgauskis at gmail.com Sun Dec 16 00:52:31 2012
From: jurgis.pralgauskis at gmail.com (Jurgis Pralgauskis)
Date: Sun, 16 Dec 2012 01:52:31 +0200
Subject: [Edu-sig] docs.tutorial function example - too complicated
Message-ID:
Hi,
currently more and more schools are trying Py,
so studens read tutorial docs from time to time...
and one of main programming (architecture) subjects starts with quite
a mathematical and unpractical example..
http://docs.python.org/3/tutorial/controlflow.html#defining-functions
It's like teaching to pilot airplane, prior to bicycle and car :)
I'd propose some simple examples at first:
like in http://en.wikibooks.org/wiki/Non-Programmer%27s_Tutorial_for_Python_3/Defining_Functions
or http://www.cplusplus.com/doc/tutorial/functions/
def greeting( person ):
print( "Hello", person )
def add(a, b):
result = a+b
return result
z = add(3, 5)
# could aslso graphically show, how data (arguments/results) travel
# as in C++ example
def absolute_value(n):
if n < 0:
n = -n
return n
def count_down( n ):
while n > 0:
print( n )
n = n-1
def average( mylist ):
return sum(mylist) / len(mylist)
def decide_on_scholarship( marks ):
avg = average(marks)
if avg > 9.5:
return 1000
elif avg >= 8:
return 200
else:
return 0
Maybe there is some other list, where it would be more appropriate to
discuss this?
--
Jurgis Pralgauskis
tel: 8-616 77613;
Don't worry, be happy and make things better ;)
http://galvosukykla.lt
From roberto03 at gmail.com Sun Dec 16 09:50:44 2012
From: roberto03 at gmail.com (roberto)
Date: Sun, 16 Dec 2012 09:50:44 +0100
Subject: [Edu-sig] docs.tutorial function example - too complicated
In-Reply-To:
References:
Message-ID:
Give a try to:
codecademy
or
learnstreet
Much easier to start, much more engaging to continue.
Going to test it with youngsters.
On Sun, Dec 16, 2012 at 12:52 AM, Jurgis Pralgauskis <
jurgis.pralgauskis at gmail.com> wrote:
> Hi,
>
> currently more and more schools are trying Py,
> so studens read tutorial docs from time to time...
> and one of main programming (architecture) subjects starts with quite
> a mathematical and unpractical example..
>
> http://docs.python.org/3/tutorial/controlflow.html#defining-functions
> It's like teaching to pilot airplane, prior to bicycle and car :)
>
>
> I'd propose some simple examples at first:
> like in
> http://en.wikibooks.org/wiki/Non-Programmer%27s_Tutorial_for_Python_3/Defining_Functions
> or http://www.cplusplus.com/doc/tutorial/functions/
>
> def greeting( person ):
> print( "Hello", person )
>
> def add(a, b):
> result = a+b
> return result
>
> z = add(3, 5)
> # could aslso graphically show, how data (arguments/results) travel
> # as in C++ example
>
>
> def absolute_value(n):
> if n < 0:
> n = -n
> return n
>
> def count_down( n ):
> while n > 0:
> print( n )
> n = n-1
>
> def average( mylist ):
> return sum(mylist) / len(mylist)
>
> def decide_on_scholarship( marks ):
> avg = average(marks)
> if avg > 9.5:
> return 1000
> elif avg >= 8:
> return 200
> else:
> return 0
>
>
> Maybe there is some other list, where it would be more appropriate to
> discuss this?
> --
> Jurgis Pralgauskis
> tel: 8-616 77613;
> Don't worry, be happy and make things better ;)
> http://galvosukykla.lt
> _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>
--
Roberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From francois.dion at gmail.com Sun Dec 16 20:19:27 2012
From: francois.dion at gmail.com (Francois Dion)
Date: Sun, 16 Dec 2012 14:19:27 -0500
Subject: [Edu-sig] docs.tutorial function example - too complicated
In-Reply-To:
References:
Message-ID:
On Sat, Dec 15, 2012 at 6:52 PM, Jurgis Pralgauskis
wrote:
> Hi,
>
> currently more and more schools are trying Py,
> so studens read tutorial docs from time to time...
> and one of main programming (architecture) subjects starts with quite
> a mathematical and unpractical example..
>
> http://docs.python.org/3/tutorial/controlflow.html#defining-functions
> It's like teaching to pilot airplane, prior to bicycle and car :)
Depends who you are teaching. There is a fine line between dumbing
down and just right...
If it is in elementary schools, I agree that is too advanced. However,
Fibonacci numbers were taught in junior high when i was in school.
When is it introduced nowadays?
I also use it all the time in workshops, tutorials or training, but
the youngest I've taught (beside my children) were 15. It is perfect
for me to introduce a module or a new concept to my audience. For
example:
http://raspberry-python.blogspot.com/2012/11/fibonacci.html
http://raspberry-python.blogspot.com/2012/11/fibospeak.html
http://raspberry-python.blogspot.com/2012/11/fibovisual.html
I've even used it more recently to demo Brython, Python for your web browser:
http://raspberry-python.blogspot.com/2012/12/brython-browser-python.html
Francois
--
www.pyptug.org - raspberry-python.blogspot.com
From jurgis.pralgauskis at gmail.com Sun Dec 16 23:47:30 2012
From: jurgis.pralgauskis at gmail.com (Jurgis Pralgauskis)
Date: Mon, 17 Dec 2012 00:47:30 +0200
Subject: [Edu-sig] docs.tutorial function example - too complicated
In-Reply-To:
References:
Message-ID:
> currently more and more schools are trying Py,
> > so studens read tutorial docs from time to time...
> > and one of main programming (architecture) subjects starts with quite
> > a mathematical and unpractical example..
> >
> > http://docs.python.org/3/tutorial/controlflow.html#defining-functions
> > It's like teaching to pilot airplane, prior to bicycle and car :)
>
> Depends who you are teaching. There is a fine line between dumbing
> down and just right...
>
> If it is in elementary schools, I agree that is too advanced. However,
> Fibonacci numbers were taught in junior high when i was in school.
> When is it introduced nowadays?
>
Well, I teach in College for future sysadmins...
and most of them are quite poor at math... :/
and I also teach in high school - in math they have just arithmetic and
geometric progressions - but only next year after I have programming :/
and Fibonacci is not easy somehow... especially for some girls..
so, if we'd like to position Python as good language for learning
programming,
I'd propose to give simpler examples of functions first :)
one more point - one guy localized documentation to my native language,
and I could use this as good source for students, but functions part
wouldn't work...
I mean - official tutorial is probably most used - so it's important to be
understandable :)
--
Jurgis Pralgauskis
tel: 8-616 77613;
Don't worry, be happy and make things better ;)
http://galvosukykla.lt
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From kirby.urner at gmail.com Mon Dec 17 00:22:38 2012
From: kirby.urner at gmail.com (kirby urner)
Date: Sun, 16 Dec 2012 15:22:38 -0800
Subject: [Edu-sig] docs.tutorial function example - too complicated
In-Reply-To:
References:
Message-ID:
The official docs for Python are not really designed for people new to
programming but for people who have already experienced programming and now
want to add Python as an additional language. The tutorial does not take
the time to slow down and start from the beginning.
John Zelle's book (and many others) are closer to what you would want to
teach people who are new to programming. 'Mathematics for the Digital Age
and Programming in Python' is another good example.
Today's average / standard mathematics courses are not all that good at
prepping students for computer programming. They don't feature many of the
concepts we would like. This has led to much discussion, on many lists,
about with a 21st century curriculum might look like. We've had a lot of
these discussions on edu-sig over the years.
I've done some pioneering of alternative "futuristic" math / STEM curricula
over the years such as this one:
http://www.4dsolutions.net/ocn/numerarcy0.html
Here's an old outline that shows more what a digital / computational math
might look like (one of any number possible):
http://4dsolutions.net/ocn/mainoutline.html
I have had many opportunities to put my ideas into practice, including with
teenagers. Many of them realize that what they're getting from me is of
far far higher quality than anything they're getting currently in their
high schools. I'm the best high school level math teacher in Portland bar
none, I might claim and defend. But I don't waste my time on such claims.
What matters more is they realize it's an uphill battle to keep themselves
from being dumbed down by their 1900s style math courses.
Kirby
On Sun, Dec 16, 2012 at 2:47 PM, Jurgis Pralgauskis <
jurgis.pralgauskis at gmail.com> wrote:
>
>
> > currently more and more schools are trying Py,
>> > so studens read tutorial docs from time to time...
>> > and one of main programming (architecture) subjects starts with quite
>> > a mathematical and unpractical example..
>> >
>> > http://docs.python.org/3/tutorial/controlflow.html#defining-functions
>> > It's like teaching to pilot airplane, prior to bicycle and car :)
>>
>> Depends who you are teaching. There is a fine line between dumbing
>> down and just right...
>>
>> If it is in elementary schools, I agree that is too advanced. However,
>> Fibonacci numbers were taught in junior high when i was in school.
>> When is it introduced nowadays?
>>
>
>
> Well, I teach in College for future sysadmins...
> and most of them are quite poor at math... :/
>
> and I also teach in high school - in math they have just arithmetic and
> geometric progressions - but only next year after I have programming :/
> and Fibonacci is not easy somehow... especially for some girls..
>
> so, if we'd like to position Python as good language for learning
> programming,
> I'd propose to give simpler examples of functions first :)
>
> one more point - one guy localized documentation to my native language,
> and I could use this as good source for students, but functions part
> wouldn't work...
> I mean - official tutorial is probably most used - so it's important to be
> understandable :)
>
>
> --
> Jurgis Pralgauskis
> tel: 8-616 77613;
> Don't worry, be happy and make things better ;)
> http://galvosukykla.lt
>
> _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From aharrin at luc.edu Mon Dec 17 03:47:04 2012
From: aharrin at luc.edu (Andrew Harrington)
Date: Sun, 16 Dec 2012 20:47:04 -0600
Subject: [Edu-sig] docs.tutorial function example - too complicated
In-Reply-To:
References:
Message-ID:
I do a very slow, step by step introduction to functions in
http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/functions.html
Lots of students have enormous difficulties with functions.
Andy
On Sat, Dec 15, 2012 at 5:52 PM, Jurgis Pralgauskis <
jurgis.pralgauskis at gmail.com> wrote:
> Hi,
>
> currently more and more schools are trying Py,
> so studens read tutorial docs from time to time...
> and one of main programming (architecture) subjects starts with quite
> a mathematical and unpractical example..
>
> http://docs.python.org/3/tutorial/controlflow.html#defining-functions
> It's like teaching to pilot airplane, prior to bicycle and car :)
>
>
> I'd propose some simple examples at first:
> like in
> http://en.wikibooks.org/wiki/Non-Programmer%27s_Tutorial_for_Python_3/Defining_Functions
> or http://www.cplusplus.com/doc/tutorial/functions/
>
> def greeting( person ):
> print( "Hello", person )
>
> def add(a, b):
> result = a+b
> return result
>
> z = add(3, 5)
> # could aslso graphically show, how data (arguments/results) travel
> # as in C++ example
>
>
> def absolute_value(n):
> if n < 0:
> n = -n
> return n
>
> def count_down( n ):
> while n > 0:
> print( n )
> n = n-1
>
> def average( mylist ):
> return sum(mylist) / len(mylist)
>
> def decide_on_scholarship( marks ):
> avg = average(marks)
> if avg > 9.5:
> return 1000
> elif avg >= 8:
> return 200
> else:
> return 0
>
>
> Maybe there is some other list, where it would be more appropriate to
> discuss this?
> --
> Jurgis Pralgauskis
> tel: 8-616 77613;
> Don't worry, be happy and make things better ;)
> http://galvosukykla.lt
> _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>
--
Dr. Andrew N. Harrington
Computer Science Department
Loyola University Chicago
Lakeshore office in the Math Department: 104 Loyola Hall
http://www.cs.luc.edu/~anh
Phone: 312-915-7999
Fax: 312-915-7998
aharrin at luc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From calcpage at aol.com Mon Dec 17 03:56:19 2012
From: calcpage at aol.com (A. Jorge Garcia)
Date: Sun, 16 Dec 2012 21:56:19 -0500 (EST)
Subject: [Edu-sig] docs.tutorial function example - too complicated
In-Reply-To:
References:
Message-ID: <8CFAA1939376FA4-1960-1E6A4@webmail-m140.sysops.aol.com>
>> 'Mathematics for the Digital Age and Programming in Python' is
another good example.
I second this sentiment! In fact, I just started a YouTube playlist
from a class that uses this book:
http://www.youtube.com/playlist?list=PLL956Pn2cKSgLHSxQLPO6YIQ8VlxLPNgc&feature=view_all
All my videos in this playlist follow the topics in the Litvins' text.
You can ignore the latest videos, however, as we are doing a case study
on TI83 BASIC not based on that text!
HTH,
A. Jorge Garcia
Applied Math, Physics and CS
http://shadowfaxrant.blogspot.com
http://www.youtube.com/calcpage2009
From jurgis.pralgauskis at gmail.com Mon Dec 17 17:00:30 2012
From: jurgis.pralgauskis at gmail.com (Jurgis Pralgauskis)
Date: Mon, 17 Dec 2012 18:00:30 +0200
Subject: [Edu-sig] docs.tutorial function example - too complicated
In-Reply-To: <8CFAA1939376FA4-1960-1E6A4@webmail-m140.sysops.aol.com>
References:
<8CFAA1939376FA4-1960-1E6A4@webmail-m140.sysops.aol.com>
Message-ID:
I generally like HandsOn and feel it is good for students' introduction to
programming...
but functions here seemed like too long (and a bit boring) introduction...
:)
maybe You'd like my proposed examples ;)
On Mon, Dec 17, 2012 at 4:56 AM, A. Jorge Garcia wrote:
> 'Mathematics for the Digital Age and Programming in Python' is
>>>
>> another good example.
>
> I second this sentiment! In fact, I just started a YouTube playlist from a
> class that uses this book:
> http://www.youtube.com/**playlist?list=**PLL956Pn2cKSgLHSxQLPO6YIQ8VlxL**
> PNgc&feature=view_all
>
> All my videos in this playlist follow the topics in the Litvins' text. You
> can ignore the latest videos, however, as we are doing a case study on TI83
> BASIC not based on that text!
>
> HTH,
> A. Jorge Garcia
> Applied Math, Physics and CS
> http://shadowfaxrant.blogspot.**com
> http://www.youtube.com/**calcpage2009
>
>
>
--
Jurgis Pralgauskis
tel: 8-616 77613;
Don't worry, be happy and make things better ;)
http://galvosukykla.lt
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From kurner at oreillyschool.com Sat Dec 22 23:33:06 2012
From: kurner at oreillyschool.com (Kirby Urner)
Date: Sat, 22 Dec 2012 14:33:06 -0800
Subject: [Edu-sig] generate digits of pi
Message-ID:
I'm taking the liberty of reposting this generator supplied by Pythonista
michel paul on Math Future. He's not the author though.
def pi_digits(n):
k, a, b, a1, b1 = 2, 4, 1, 12, 4
while n>0:
p, q, k = k*k, 2*k+1, k+1
a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1
d, d1 = a/b, a1/b1
while d == d1:
yield int(d)
n -= 1
a, a1 = 10*(a%b), 10*(a1%b1)
d, d1 = a/b, a1/b1
More context:
https://groups.google.com/d/msg/mathfuture/LA0pMPC6-HE/MBGWxn4ENsUJ
Kirby
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From david at handysoftware.com Sun Dec 23 00:25:50 2012
From: david at handysoftware.com (david at handysoftware.com)
Date: Sat, 22 Dec 2012 18:25:50 -0500 (EST)
Subject: [Edu-sig] generate digits of pi
In-Reply-To:
References:
Message-ID: <1356218750.053811759@apps.rackspace.com>
Thanks for posting this.
I had to try it out. I found it behaves differently depending on the version of Python you use.
Python 3.2.2: pi_digits(79) generates 79 digits:
3141592653589793238462643383279502884197169399375105820974944592307816406286208
Python 2.6.5: pi_digits(79) generates 81 digits:
314159265358979323846264338327950288419716939937510582097494459230781640628620899
The 80th and 81st digits generated by Python 2.6.5 are correct, but unasked for. Assuming that the difference in behavior was due to the difference in the behavior of the division operator (what else could it be?) I ran it again using "python -Qnew" and this time got 82 digits:
3141592653589793238462643383279502884197169399375105820974944592307816406286208998
Bizarre. Tricky. On which version of Python was this generator intended to run, I wonder?
David H
-----Original Message-----
From: "Kirby Urner"
Sent: Saturday, December 22, 2012 5:33pm
To: edu-sig at python.org
Subject: [Edu-sig] generate digits of pi
I'm taking the liberty of reposting this generator supplied by Pythonista michel paul on Math Future. He's not the author though.
def pi_digits(n):
k, a, b, a1, b1 = 2, 4, 1, 12, 4
while n>0:
p, q, k = k*k, 2*k+1, k+1
a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1
d, d1 = a/b, a1/b1
while d == d1:
yield int(d)
n -= 1
a, a1 = 10*(a%b), 10*(a1%b1)
d, d1 = a/b, a1/b1
More context:
[https://groups.google.com/d/msg/mathfuture/LA0pMPC6-HE/MBGWxn4ENsUJ] https://groups.google.com/d/msg/mathfuture/LA0pMPC6-HE/MBGWxn4ENsUJ
Kirby
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From kurner at oreillyschool.com Sun Dec 23 01:32:23 2012
From: kurner at oreillyschool.com (Kirby Urner)
Date: Sat, 22 Dec 2012 16:32:23 -0800
Subject: [Edu-sig] generate digits of pi
In-Reply-To: <1356218750.053811759@apps.rackspace.com>
References:
<1356218750.053811759@apps.rackspace.com>
Message-ID:
'3141592653589793238462643383279502884197169399375105820974944592307816406286208'
Yeah, I see (that was using 3.2). Different frazzle at the end of the
rope, but if you ask for more digits, they continue to agree out to the
last bit and so on. Is that it?
Kirby
On Sat, Dec 22, 2012 at 3:25 PM, wrote:
> Thanks for posting this.
>
>
>
> I had to try it out. I found it behaves differently depending on the
> version of Python you use.
>
>
>
> Python 3.2.2: pi_digits(79) generates 79 digits:
>
>
>
>
> 3141592653589793238462643383279502884197169399375105820974944592307816406286208
>
>
>
> Python 2.6.5: pi_digits(79) generates 81 digits:
>
>
>
>
> 314159265358979323846264338327950288419716939937510582097494459230781640628620899
>
>
>
> The 80th and 81st digits generated by Python 2.6.5 are correct, but
> unasked for. Assuming that the difference in behavior was due to the
> difference in the behavior of the division operator (what else could it
> be?) I ran it again using "python -Qnew" and this time got 82 digits:
>
>
>
>
> 3141592653589793238462643383279502884197169399375105820974944592307816406286208998
>
>
>
> Bizarre. Tricky. On which version of Python was this generator intended to
> run, I wonder?
>
>
>
> David H
>
>
>
> -----Original Message-----
> From: "Kirby Urner"
> Sent: Saturday, December 22, 2012 5:33pm
> To: edu-sig at python.org
> Subject: [Edu-sig] generate digits of pi
>
> I'm taking the liberty of reposting this generator supplied by
> Pythonista michel paul on Math Future. He's not the author though.
>
> def pi_digits(n):
> k, a, b, a1, b1 = 2, 4, 1, 12, 4
> while n>0:
> p, q, k = k*k, 2*k+1, k+1
> a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1
> d, d1 = a/b, a1/b1
> while d == d1:
> yield int(d)
> n -= 1
> a, a1 = 10*(a%b), 10*(a1%b1)
> d, d1 = a/b, a1/b1
>
>
>
> More context:
>
> https://groups.google.com/d/msg/mathfuture/LA0pMPC6-HE/MBGWxn4ENsUJ
>
> Kirby
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From david at handysoftware.com Sun Dec 23 01:40:18 2012
From: david at handysoftware.com (david at handysoftware.com)
Date: Sat, 22 Dec 2012 19:40:18 -0500 (EST)
Subject: [Edu-sig] generate digits of pi
In-Reply-To:
References:
<1356218750.053811759@apps.rackspace.com>
Message-ID: <1356223218.278328242@apps.rackspace.com>
In each case I asked for only 79 digits, but got 79, 82, and 83 digits depending on whether I was using python 3.2, python 2.6, or python 2.6 with -Qnew, respectively. The digits all seem to be correct, but the algorithm for stopping at digit n seems to be very sensitive.
David H
-----Original Message-----
From: "Kirby Urner"
Sent: Saturday, December 22, 2012 7:32pm
To: david at handysoftware.com
Cc: edu-sig at python.org
Subject: Re: [Edu-sig] generate digits of pi
'3141592653589793238462643383279502884197169399375105820974944592307816406286208'
Yeah, I see (that was using 3.2). Different frazzle at the end of the rope, but if you ask for more digits, they continue to agree out to the last bit and so on. Is that it?
Kirby
On Sat, Dec 22, 2012 at 3:25 PM, <[mailto:david at handysoftware.com] david at handysoftware.com> wrote:
Thanks for posting this.
I had to try it out. I found it behaves differently depending on the version of Python you use.
Python 3.2.2: pi_digits(79) generates 79 digits:
3141592653589793238462643383279502884197169399375105820974944592307816406286208
Python 2.6.5: pi_digits(79) generates 81 digits:
314159265358979323846264338327950288419716939937510582097494459230781640628620899
The 80th and 81st digits generated by Python 2.6.5 are correct, but unasked for. Assuming that the difference in behavior was due to the difference in the behavior of the division operator (what else could it be?) I ran it again using "python -Qnew" and this time got 82 digits:
3141592653589793238462643383279502884197169399375105820974944592307816406286208998
Bizarre. Tricky. On which version of Python was this generator intended to run, I wonder?
David H
-----Original Message-----
From: "Kirby Urner" <[mailto:kurner at oreillyschool.com] kurner at oreillyschool.com>
Sent: Saturday, December 22, 2012 5:33pm
To: [mailto:edu-sig at python.org] edu-sig at python.org
Subject: [Edu-sig] generate digits of pi
I'm taking the liberty of reposting this generator supplied by Pythonista michel paul on Math Future. He's not the author though.
def pi_digits(n):
k, a, b, a1, b1 = 2, 4, 1, 12, 4
while n>0:
p, q, k = k*k, 2*k+1, k+1
a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1
d, d1 = a/b, a1/b1
while d == d1:
yield int(d)
n -= 1
a, a1 = 10*(a%b), 10*(a1%b1)
d, d1 = a/b, a1/b1
More context:
[https://groups.google.com/d/msg/mathfuture/LA0pMPC6-HE/MBGWxn4ENsUJ] https://groups.google.com/d/msg/mathfuture/LA0pMPC6-HE/MBGWxn4ENsUJ
Kirby
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From mamckenna at sch.ci.lexington.ma.us Sun Dec 23 01:47:00 2012
From: mamckenna at sch.ci.lexington.ma.us (Marianne McKenna)
Date: Sat, 22 Dec 2012 19:47:00 -0500
Subject: [Edu-sig] Edu-sig Digest, Vol 113, Issue 8
Message-ID:
I will be out of the office for the holiday break. I will be checking
email periodically and will respond as soon as I can.
If you need immediate help please contact the computer center.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From kurner at oreillyschool.com Sun Dec 23 02:34:38 2012
From: kurner at oreillyschool.com (Kirby Urner)
Date: Sat, 22 Dec 2012 17:34:38 -0800
Subject: [Edu-sig] generate digits of pi
In-Reply-To: <1356223218.278328242@apps.rackspace.com>
References:
<1356218750.053811759@apps.rackspace.com>
<1356223218.278328242@apps.rackspace.com>
Message-ID:
Got it, no wrong digits just not always exactly the number you asked for.
This happens often in 3.2 as well:
>>> exp = ((n,len(list(pi_digits(n)))) for n in range(10000)) # (number
asked, number got)
>>> exp2 = ((a,b) for a,b in exp if a != b) # filter on "not same"
>>> for i in range(10): print(next(exp2), end=", ")
(2, 3), (4, 5), (10, 11), (16, 17), (18, 19), (22, 23), (28, 31), (29, 31),
(30, 31), (34, 36),
Kirby
On Sat, Dec 22, 2012 at 4:40 PM, wrote:
> In each case I asked for only 79 digits, but got 79, 82, and 83 digits
> depending on whether I was using python 3.2, python 2.6, or python 2.6 with
> -Qnew, respectively. The digits all seem to be correct, but the algorithm
> for stopping at digit n seems to be very sensitive.
>
>
>
> David H
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From mamckenna at sch.ci.lexington.ma.us Sun Dec 23 12:00:40 2012
From: mamckenna at sch.ci.lexington.ma.us (Marianne McKenna)
Date: Sun, 23 Dec 2012 06:00:40 -0500
Subject: [Edu-sig] Edu-sig Digest, Vol 113, Issue 9
Message-ID:
I will be out of the office for the holiday break. I will be checking
email periodically and will respond as soon as I can.
If you need immediate help please contact the computer center.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From pythonic.math at gmail.com Mon Dec 24 00:49:52 2012
From: pythonic.math at gmail.com (michel paul)
Date: Sun, 23 Dec 2012 15:49:52 -0800
Subject: [Edu-sig] generate digits of pi
In-Reply-To:
References:
<1356218750.053811759@apps.rackspace.com>
<1356223218.278328242@apps.rackspace.com>
Message-ID:
I realized something. This was the original version:
def pi_digits():
k, a, b, a1, b1 = 2, 4, 1, 12, 4
while True:
p, q, k = k*k, 2*k+1, k+1
a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1
d, d1 = a/b, a1/b1
while d == d1:
yield int(d)
a, a1 = 10*(a%b), 10*(a1%b1)
d, d1 = a/b, a1/b1
I forget where it came from. Like I had mentioned, I had a really bright
student awhile back who was really intrigued by this, and he at one point
edited it to produce the digits in binary. In the original form the
generator never terminates. Somewhere along the line an edit was made to
try to get it to terminate at n digits. Probably to make calling it easy to
call as in list(pi_digits(n)).
- Michel
On Sat, Dec 22, 2012 at 5:34 PM, Kirby Urner wrote:
> Got it, no wrong digits just not always exactly the number you asked for.
>
> This happens often in 3.2 as well:
>
> >>> exp = ((n,len(list(pi_digits(n)))) for n in range(10000)) # (number
> asked, number got)
> >>> exp2 = ((a,b) for a,b in exp if a != b) # filter on "not same"
> >>> for i in range(10): print(next(exp2), end=", ")
> (2, 3), (4, 5), (10, 11), (16, 17), (18, 19), (22, 23), (28, 31), (29,
> 31), (30, 31), (34, 36),
>
> Kirby
>
>
>
> On Sat, Dec 22, 2012 at 4:40 PM, wrote:
>
>> In each case I asked for only 79 digits, but got 79, 82, and 83 digits
>> depending on whether I was using python 3.2, python 2.6, or python 2.6 with
>> -Qnew, respectively. The digits all seem to be correct, but the algorithm
>> for stopping at digit n seems to be very sensitive.
>>
>>
>>
>> David H
>>
>>
>>
>
> _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>
>
--
==================================
"What I cannot create, I do not understand."
- Richard Feynman
==================================
"Computer science is the new mathematics."
- Dr. Christos Papadimitriou
==================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From kirby.urner at gmail.com Mon Dec 24 01:35:10 2012
From: kirby.urner at gmail.com (kirby urner)
Date: Sun, 23 Dec 2012 16:35:10 -0800
Subject: [Edu-sig] generate digits of pi
In-Reply-To:
References:
<1356218750.053811759@apps.rackspace.com>
<1356223218.278328242@apps.rackspace.com>
Message-ID:
Right, there's like a "stutter" in the inner while loop where it sometimes
spits out more digits before getting back to the outer loop, so sometimes
you get one or two more digits than requested.
That doesn't mean I understand the algorithm, i.e. why d == d1 is critical.
Kirby
On Sun, Dec 23, 2012 at 3:49 PM, michel paul wrote:
> I realized something. This was the original version:
>
> def pi_digits():
> k, a, b, a1, b1 = 2, 4, 1, 12, 4
> while True:
> p, q, k = k*k, 2*k+1, k+1
> a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1
> d, d1 = a/b, a1/b1
> while d == d1:
> yield int(d)
> a, a1 = 10*(a%b), 10*(a1%b1)
> d, d1 = a/b, a1/b1
>
>
> I forget where it came from. Like I had mentioned, I had a really bright
> student awhile back who was really intrigued by this, and he at one point
> edited it to produce the digits in binary. In the original form the
> generator never terminates. Somewhere along the line an edit was made to
> try to get it to terminate at n digits. Probably to make calling it easy to
> call as in list(pi_digits(n)).
>
> - Michel
>
>
> On Sat, Dec 22, 2012 at 5:34 PM, Kirby Urner wrote:
>
>> Got it, no wrong digits just not always exactly the number you asked for.
>>
>> This happens often in 3.2 as well:
>>
>> >>> exp = ((n,len(list(pi_digits(n)))) for n in range(10000)) # (number
>> asked, number got)
>> >>> exp2 = ((a,b) for a,b in exp if a != b) # filter on "not same"
>> >>> for i in range(10): print(next(exp2), end=", ")
>> (2, 3), (4, 5), (10, 11), (16, 17), (18, 19), (22, 23), (28, 31), (29,
>> 31), (30, 31), (34, 36),
>>
>> Kirby
>>
>>
>>
>> On Sat, Dec 22, 2012 at 4:40 PM, wrote:
>>
>>> In each case I asked for only 79 digits, but got 79, 82, and 83 digits
>>> depending on whether I was using python 3.2, python 2.6, or python 2.6 with
>>> -Qnew, respectively. The digits all seem to be correct, but the algorithm
>>> for stopping at digit n seems to be very sensitive.
>>>
>>>
>>>
>>> David H
>>>
>>>
>>>
>>
>> _______________________________________________
>> Edu-sig mailing list
>> Edu-sig at python.org
>> http://mail.python.org/mailman/listinfo/edu-sig
>>
>>
>
>
> --
> ==================================
> "What I cannot create, I do not understand."
>
> - Richard Feynman
> ==================================
> "Computer science is the new mathematics."
>
> - Dr. Christos Papadimitriou
> ==================================
>
> _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From david at handysoftware.com Mon Dec 24 05:54:09 2012
From: david at handysoftware.com (david at handysoftware.com)
Date: Sun, 23 Dec 2012 23:54:09 -0500 (EST)
Subject: [Edu-sig] generate digits of pi
In-Reply-To:
References:
<1356218750.053811759@apps.rackspace.com>
<1356223218.278328242@apps.rackspace.com>
Message-ID: <1356324849.671731886@apps.rackspace.com>
Here's an easier, pythonic way to limit the number of digits, given the original, non-terminating pi generator:
>>> import itertools
>>> print(list( itertools.islice(pi_digits(), 10) ))
[3, 1, 4, 1, 5, 9, 2, 6, 5, 3]
David H
-----Original Message-----
From: "michel paul"
Sent: Sunday, December 23, 2012 6:49pm
To: "Kirby Urner"
Cc: david at handysoftware.com, "edu-sig at python.org" , "michel paul"
Subject: Re: [Edu-sig] generate digits of pi
I realized something. This was the original version:
def pi_digits():
k, a, b, a1, b1 = 2, 4, 1, 12, 4
while True:
p, q, k = k*k, 2*k+1, k+1
a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1
d, d1 = a/b, a1/b1
while d == d1:
yield int(d)
a, a1 = 10*(a%b), 10*(a1%b1)
d, d1 = a/b, a1/b1
I forget where it came from. Like I had mentioned, I had a really bright student awhile back who was really intrigued by this, and he at one point edited it to produce the digits in binary. In the original form the generator never terminates. Somewhere along the line an edit was made to try to get it to terminate at n digits. Probably to make calling it easy to call as in list(pi_digits(n)).
- Michel
On Sat, Dec 22, 2012 at 5:34 PM, Kirby Urner <[mailto:kurner at oreillyschool.com] kurner at oreillyschool.com> wrote:
Got it, no wrong digits just not always exactly the number you asked for.
This happens often in 3.2 as well:
>>> exp = ((n,len(list(pi_digits(n)))) for n in range(10000)) # (number asked, number got)
>>> exp2 = ((a,b) for a,b in exp if a != b) # filter on "not same"
>>> for i in range(10): print(next(exp2), end=", ")
(2, 3), (4, 5), (10, 11), (16, 17), (18, 19), (22, 23), (28, 31), (29, 31), (30, 31), (34, 36),
Kirby
On Sat, Dec 22, 2012 at 4:40 PM, <[mailto:david at handysoftware.com] david at handysoftware.com> wrote:
In each case I asked for only 79 digits, but got 79, 82, and 83 digits depending on whether I was using python 3.2, python 2.6, or python 2.6 with -Qnew, respectively. The digits all seem to be correct, but the algorithm for stopping at digit n seems to be very sensitive.
David H
_______________________________________________
Edu-sig mailing list
[mailto:Edu-sig at python.org] Edu-sig at python.org
[http://mail.python.org/mailman/listinfo/edu-sig] http://mail.python.org/mailman/listinfo/edu-sig
--
==================================
"What I cannot create, I do not understand."
- Richard Feynman==================================
"Computer science is the new mathematics."
- Dr. Christos Papadimitriou
==================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From litvin at skylit.com Mon Dec 24 06:20:24 2012
From: litvin at skylit.com (Litvin)
Date: Mon, 24 Dec 2012 00:20:24 -0500
Subject: [Edu-sig] generate digits of pi
In-Reply-To: <1356324849.671731886@apps.rackspace.com>
References:
<1356218750.053811759@apps.rackspace.com>
<1356223218.278328242@apps.rackspace.com>
<1356324849.671731886@apps.rackspace.com>
Message-ID: <7.0.1.0.2.20121224001759.04037958@skylit.com>
Or just replace
while d == d1:
with
while d == d1 and n > 0:
Gary Litvin
www.skylit.com
At 11:54 PM 12/23/2012, david at handysoftware.com wrote:
>Here's an easier, pythonic way to limit the number of digits, given
>the original, non-terminating pi generator:
>
> >>> import itertools
> >>> print(list( itertools.islice(pi_digits(), 10) ))
>[3, 1, 4, 1, 5, 9, 2, 6, 5, 3]
>
>
>
>David H
>
>
>
>-----Original Message-----
>From: "michel paul"
>Sent: Sunday, December 23, 2012 6:49pm
>To: "Kirby Urner"
>Cc: david at handysoftware.com, "edu-sig at python.org"
>, "michel paul"
>Subject: Re: [Edu-sig] generate digits of pi
>
>I realized something. This was the original version:
>
>def pi_digits():
>k, a, b, a1, b1 = 2, 4, 1, 12, 4
>while True:
>p, q, k = k*k, 2*k+1, k+1
>a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1
>d, d1 = a/b, a1/b1
>while d == d1:
>yield int(d)
>a, a1 = 10*(a%b), 10*(a1%b1)
>d, d1 = a/b, a1/b1
>
>I forget where it came from. Like I had mentioned, I had a really
>bright student awhile back who was really intrigued by this, and he
>at one point edited it to produce the digits in binary. In the
>original form the generator never terminates. Somewhere along the
>line an edit was made to try to get it to terminate at n digits.
>Probably to make calling it easy to call as in list(pi_digits(n)).
>- Michel
>
>
>On Sat, Dec 22, 2012 at 5:34 PM, Kirby Urner
><kurner at oreillyschool.com> wrote:
>Got it, no wrong digits just not always exactly the number you asked for.
>
>This happens often in 3.2 as well:
>
> >>> exp = ((n,len(list(pi_digits(n)))) for n in range(10000)) #
> (number asked, number got)
> >>> exp2 = ((a,b) for a,b in exp if a != b) # filter on "not same"
> >>> for i in range(10): print(next(exp2), end=", ")
>(2, 3), (4, 5), (10, 11), (16, 17), (18, 19), (22, 23), (28, 31),
>(29, 31), (30, 31), (34, 36),
>
>Kirby
>
>
>
>On Sat, Dec 22, 2012 at 4:40 PM,
><david at handysoftware.com> wrote:
>
>In each case I asked for only 79 digits, but got 79, 82, and 83
>digits depending on whether I was using python 3.2, python 2.6, or
>python 2.6 with -Qnew, respectively. The digits all seem to be
>correct, but the algorithm for stopping at digit n seems to be very sensitive.
>
>
>
>David H
>
>
>
>
>_______________________________________________
>Edu-sig mailing list
>Edu-sig at python.org
>http://mail.python.org/mailman/listinfo/edu-sig
>
>
>
>--
>==================================
>"What I cannot create, I do not understand."
>- Richard Feynman
>==================================
>"Computer science is the new mathematics."
>- Dr. Christos Papadimitriou
>==================================
>_______________________________________________
>Edu-sig mailing list
>Edu-sig at python.org
>http://mail.python.org/mailman/listinfo/edu-sig
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From mamckenna at sch.ci.lexington.ma.us Mon Dec 24 12:00:23 2012
From: mamckenna at sch.ci.lexington.ma.us (Marianne McKenna)
Date: Mon, 24 Dec 2012 06:00:23 -0500
Subject: [Edu-sig] Edu-sig Digest, Vol 113, Issue 11
Message-ID:
I will be out of the office for the holiday break. I will be checking
email periodically and will respond as soon as I can.
If you need immediate help please contact the computer center.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From bblais at gmail.com Mon Dec 24 12:51:31 2012
From: bblais at gmail.com (Brian Blais)
Date: Mon, 24 Dec 2012 06:51:31 -0500
Subject: [Edu-sig] generate digits of pi
In-Reply-To: <7.0.1.0.2.20121224001759.04037958@skylit.com>
References:
<1356218750.053811759@apps.rackspace.com>
<1356223218.278328242@apps.rackspace.com>
<1356324849.671731886@apps.rackspace.com>
<7.0.1.0.2.20121224001759.04037958@skylit.com>
Message-ID:
On Dec 24, 2012, at 0:20 AM, Litvin wrote:
> Or just replace
>
> while d == d1:
> with
> while d == d1 and n > 0:
>
or replace the "while" with a "while True" and a
if n==0:
raise StopIteration
bb
--
Brian Blais
bblais at gmail.com
http://web.bryant.edu/~bblais
http://brianblais.wordpress.com/
From mamckenna at sch.ci.lexington.ma.us Tue Dec 25 12:00:26 2012
From: mamckenna at sch.ci.lexington.ma.us (Marianne McKenna)
Date: Tue, 25 Dec 2012 06:00:26 -0500
Subject: [Edu-sig] Edu-sig Digest, Vol 113, Issue 12
Message-ID:
I will be out of the office for the holiday break. I will be checking
email periodically and will respond as soon as I can.
If you need immediate help please contact the computer center.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From kirby.urner at gmail.com Wed Dec 26 08:17:09 2012
From: kirby.urner at gmail.com (kirby urner)
Date: Tue, 25 Dec 2012 23:17:09 -0800
Subject: [Edu-sig] Fwd: [Chicago] Dr Chuck MOOC
In-Reply-To:
References:
Message-ID:
On my radar...
---------- Forwarded message ----------
From: Randy Baxley
Date: Sat, Dec 22, 2012 at 12:49 PM
Subject: [Chicago] Dr Chuck MOOC
To: chicago at python.org
http://online.dr-chuck.com/index.php
Dr. Chuck is a fun professor and I have already worked through his
pythonlearn.com basics so this should be fun.
Randy
_______________________________________________
Chicago mailing list
Chicago at python.org
http://mail.python.org/mailman/listinfo/chicago
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From mamckenna at sch.ci.lexington.ma.us Wed Dec 26 12:00:24 2012
From: mamckenna at sch.ci.lexington.ma.us (Marianne McKenna)
Date: Wed, 26 Dec 2012 06:00:24 -0500
Subject: [Edu-sig] Edu-sig Digest, Vol 113, Issue 13
Message-ID:
I will be out of the office for the holiday break. I will be checking
email periodically and will respond as soon as I can.
If you need immediate help please contact the computer center.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From mamckenna at sch.ci.lexington.ma.us Thu Dec 27 12:07:34 2012
From: mamckenna at sch.ci.lexington.ma.us (Marianne McKenna)
Date: Thu, 27 Dec 2012 06:07:34 -0500
Subject: [Edu-sig] Edu-sig Digest, Vol 113, Issue 14
Message-ID:
I will be out of the office for the holiday break. I will be checking
email periodically and will respond as soon as I can.
If you need immediate help please contact the computer center.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From memilanuk at gmail.com Thu Dec 27 22:55:58 2012
From: memilanuk at gmail.com (Monte Milanuk)
Date: Thu, 27 Dec 2012 13:55:58 -0800
Subject: [Edu-sig] Edu-sig Digest, Vol 113, Issue 14
In-Reply-To:
References:
Message-ID:
Once again, can someone please unsubscribe this twit?
Looking in the archives, since 2009, the only time we see posts from her
is when she forgets (again) to exclude the group from her vacation
response. She obviously isn't reading the list or paying attention...
so lets be done with her, eh?
From mamckenna at sch.ci.lexington.ma.us Fri Dec 28 12:00:23 2012
From: mamckenna at sch.ci.lexington.ma.us (Marianne McKenna)
Date: Fri, 28 Dec 2012 06:00:23 -0500
Subject: [Edu-sig] Edu-sig Digest, Vol 113, Issue 15
Message-ID:
I will be out of the office for the holiday break. I will be checking
email periodically and will respond as soon as I can.
If you need immediate help please contact the computer center.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From da.ajoy at gmail.com Fri Dec 28 16:34:07 2012
From: da.ajoy at gmail.com (Daniel Ajoy)
Date: Fri, 28 Dec 2012 10:34:07 -0500
Subject: [Edu-sig] Edu-sig Digest, Vol 113, Issue 14
In-Reply-To:
References:
Message-ID:
+1
On Fri, 28 Dec 2012 06:00:01 -0500, wrote:
> Once again, can someone please unsubscribe this twit?
From mamckenna at sch.ci.lexington.ma.us Sat Dec 29 12:00:29 2012
From: mamckenna at sch.ci.lexington.ma.us (Marianne McKenna)
Date: Sat, 29 Dec 2012 06:00:29 -0500
Subject: [Edu-sig] Edu-sig Digest, Vol 113, Issue 16
Message-ID:
I will be out of the office for the holiday break. I will be checking
email periodically and will respond as soon as I can.
If you need immediate help please contact the computer center.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From mamckenna at sch.ci.lexington.ma.us Sun Dec 30 12:00:26 2012
From: mamckenna at sch.ci.lexington.ma.us (Marianne McKenna)
Date: Sun, 30 Dec 2012 06:00:26 -0500
Subject: [Edu-sig] Edu-sig Digest, Vol 113, Issue 17
Message-ID:
I will be out of the office for the holiday break. I will be checking
email periodically and will respond as soon as I can.
If you need immediate help please contact the computer center.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From mamckenna at sch.ci.lexington.ma.us Mon Dec 31 12:00:34 2012
From: mamckenna at sch.ci.lexington.ma.us (Marianne McKenna)
Date: Mon, 31 Dec 2012 06:00:34 -0500
Subject: [Edu-sig] Edu-sig Digest, Vol 113, Issue 18
Message-ID:
I will be out of the office for the holiday break. I will be checking
email periodically and will respond as soon as I can.
If you need immediate help please contact the computer center.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: