Loving Python - Chapter 2 Released!

6 views
Skip to first unread message

MM.Brian

unread,
Dec 24, 2009, 4:28:04 AM12/24/09
to sharifpython88
Salam :)
tu in ghesmat ham say shode mavaredi amuzesh dade beshe ke tu halle
soalaye projecteuler mitunan mofid bashan. barkhi az matalebi ke onvan
shodan niazmande ineke khanande Chaptere 1 ro khub khunde bashe.
Movaffagh Bashid :)

Content: Introducing Sets, Introducing decimal class, some simple
python tips and tricks.
Writers: Milad Heydariaan, Mohsen Mansouryar
Link:
http://sharifpython88.googlegroups.com/web/Loving+Python+-+Chapter+2.pdf?gda=UuZ1g1AAAACqb435WmJDLcPSBf2A8e2SfaUYTL_H-0RINfIt2OQ3hRFCk2166zlloED8BnHFUYYjGjYx5VfR-4eTztM1Yr53bcVT3VtYGKLco-_l-8AzjQ&gsc=GYNwzwsAAAD2n1y9u_KU42KgfloEdTs9

maryam kamali

unread,
Dec 24, 2009, 2:14:34 PM12/24/09
to sharifp...@googlegroups.com
dustaan kasi midune sieve tu python chikar mikonee?
--
Maryam

Mehdi Mirkia

unread,
Dec 25, 2009, 7:35:16 AM12/25/09
to sharifp...@googlegroups.com
It would be better if you mentioned where you have faced this word and what the problem exactly is,But I guess this link would help:http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes

Milad Heydarian

unread,
Dec 25, 2009, 8:16:13 AM12/25/09
to sharifpython88
Do you mean The Sieve of Eratosthenes ?

Python Code Snippet for The Sieve of Eratosthenes :

def eras(n):
siv=range(n+1)
siv[1]=0
sqn=int(round(n**0.5))
for i in range(2,sqn+1):
if siv[i]!=0:
siv[2*i:n/i*i+1:i]=[0]*(n/i-1)
return filter(None,siv)

Usage :
>>> eras(50)
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]

On Dec 24, 10:14 pm, maryam kamali <kamali.mar...@gmail.com> wrote:
> dustaan kasi midune sieve tu python chikar mikonee?
>

> On Thu, Dec 24, 2009 at 1:28 AM, MM.Brian <mohsen.br...@gmail.com> wrote:
> > Salam :)
> > tu in ghesmat ham say shode mavaredi amuzesh dade beshe ke tu halle
> > soalaye projecteuler mitunan mofid bashan. barkhi az matalebi ke onvan
> > shodan niazmande ineke khanande Chaptere 1 ro khub khunde bashe.
> > Movaffagh Bashid :)
>
> > Content: Introducing Sets, Introducing decimal class, some simple
> > python tips and tricks.
> > Writers: Milad Heydariaan, Mohsen Mansouryar
> > Link:
>

> >http://sharifpython88.googlegroups.com/web/Loving+Python+-+Chapter+2....
>
> --
> Maryam

maryam jafarabadi

unread,
Dec 25, 2009, 9:06:55 AM12/25/09
to sharifp...@googlegroups.com
salam
man  search kardam ...  zaheran dar ertebat ba adade aval karbord dare !
3 ta link mizaram baratoon .
ye tozihati dare to ina :
http://jijo.free.net.ph/8
http://www.python-forum.org/pythonforum/viewtopic.php?f=2&t=11105&start=0
http://en.literateprograms.org/Sieve_of_Eratosthenes_(Python,_arrays)
maryam jafarabadi

On Thu, Dec 24, 2009 at 10:44 PM, maryam kamali <kamali...@gmail.com> wrote:



--
- best  Regards -

maryam kamali

unread,
Dec 25, 2009, 10:00:07 AM12/25/09
to sharifp...@googlegroups.com
Thanks a lot Mehdi , Milad and Maryam
I got it now ;)
--
Maryam
Reply all
Reply to author
Forward
0 new messages