Re: Newbie to python. Very newbie question

2013-04-07 Thread Steven D'Aprano
On Sun, 07 Apr 2013 04:16:27 -0700, ReviewBoard User wrote: > Hi > I am a newbie to python and am trying to write a program that does a sum > of squares of numbers whose squares are odd. For example, for x from 1 > to 100, it generates 165 as an output (sum of 1,9,25,49,81) > >

Re: Newbie to python. Very newbie question

2013-04-07 Thread Miki Tebeka
> I can't even read that mess... three nested lambda? I have to say this and other answers in this thread seem not that friendly to me. The OP said it's a newbie question, we should be more welcoming to newcomers. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie to python. Very newbie question

2013-04-07 Thread Arnaud Delobelle
On 7 April 2013 20:23, Ian Foote wrote: > I'm surprised no one has suggested: > import math sum( x*x for x in range(1, int(math.sqrt(100)), 2)) Yeah! And I'm surprised no one came up with: >>> from itertools import count, takewhile >>> sum(takewhile((100).__gt__, filter((2).__rmod__, m

Re: Newbie to python. Very newbie question

2013-04-07 Thread Ian Foote
On 07/04/13 20:09, Dennis Lee Bieber wrote: On Sun, 7 Apr 2013 04:16:27 -0700 (PDT), ReviewBoard User declaimed the following in gmane.comp.python.general: Hi I am a newbie to python and am trying to write a program that does a sum of squares of numbers whose squares are odd. For example, for

Re: Newbie to python. Very newbie question

2013-04-07 Thread rusi
On Apr 7, 4:16 pm, ReviewBoard User wrote: > Hi > I am a newbie to python and am trying to write a program that does a > sum of squares of numbers whose squares are odd. > For example, for x from 1 to 100, it generates 165 as an output (sum > of 1,9,25,49,81) > > Here is th

Re: Newbie to python. Very newbie question

2013-04-07 Thread Miki Tebeka
> I am a newbie to python Welcome! I hope you'll do great things with Python. > and am trying to write a program that does a > sum of squares of numbers whose squares are odd. OK. > For example, for x from 1 to 100, it generates 165 as an output (sum > of 1,9,25,49,81) I do

Re: Newbie to python. Very newbie question

2013-04-07 Thread Dave Angel
On 04/07/2013 07:16 AM, ReviewBoard User wrote: Hi I am a newbie to python Then why are you trying to do 7 or 8 things on one line? and am trying to write a program that does a sum of squares of numbers whose squares are odd. For example, for x from 1 to 100, it generates 165 as an output

Re: Newbie to python. Very newbie question

2013-04-07 Thread Kruno Saho
On Sunday, April 7, 2013 9:16:27 PM UTC+10, ReviewBoard User wrote: > Hi > > I am a newbie to python and am trying to write a program that does a > > sum of squares of numbers whose squares are odd. > > For example, for x from 1 to 100, it generates 165 as an output (sum

Newbie to python. Very newbie question

2013-04-07 Thread ReviewBoard User
Hi I am a newbie to python and am trying to write a program that does a sum of squares of numbers whose squares are odd. For example, for x from 1 to 100, it generates 165 as an output (sum of 1,9,25,49,81) Here is the code I have print reduce(lambda x, y: x+y, filter(lambda x: x%2, map(lambda x

Re: newbie to python

2010-10-24 Thread Steve Holden
On 10/24/2010 5:19 PM, rantingrick wrote: > On Oct 24, 7:31 am, Steve Holden wrote: >> On 10/24/2010 3:29 AM, Hrishikesh wrote: >> >>> I want to start python, I have just downloaded python compiler, Can >>> somebody please tell me what python really is and explain its >>> architecture, in what pro

Re: newbie to python

2010-10-24 Thread rantingrick
On Oct 24, 7:31 am, Steve Holden wrote: > On 10/24/2010 3:29 AM, Hrishikesh wrote: > > > I want to start python, I have just downloaded python compiler, Can > > somebody please tell me what python really is and explain its > > architecture, in what problems it is used and from where should I > > s

Re: newbie to python

2010-10-24 Thread Steve Holden
On 10/24/2010 3:29 AM, Hrishikesh wrote: > I want to start python, I have just downloaded python compiler, Can > somebody please tell me what python really is and explain its > architecture, in what problems it is used and from where should I > start? If you don't know the answers to *any* of thos

Re: newbie to python

2010-10-24 Thread Arnaud Delobelle
Hrishikesh writes: > Thanks guys, > > I knew its an interpreter, mistakenly put compiler [...] Oops! You just started a flame war ;) -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie to python

2010-10-24 Thread Hrishikesh
On Oct 24, 12:48 am, Arnaud Delobelle wrote: > Hrishikesh writes: > > I want to start python, I have just downloaded python compiler, Can > > somebody please tell me what python really is and explain its > > architecture, in what problems it is used and from where should I > > start? > > I would

Re: newbie to python

2010-10-24 Thread Arnaud Delobelle
Hrishikesh writes: > I want to start python, I have just downloaded python compiler, Can > somebody please tell me what python really is and explain its > architecture, in what problems it is used and from where should I > start? I would start by looking at http://www.python.org To learn P

Re: newbie to python

2010-10-24 Thread Chris Rebert
On Sun, Oct 24, 2010 at 12:29 AM, Hrishikesh wrote: > I want to start python, I have just downloaded python compiler, Most consider it an interpreter (though it does compile the source code into high-level bytecode). > Can > somebody please tell me what python really is A programming language.

newbie to python

2010-10-24 Thread Hrishikesh
I want to start python, I have just downloaded python compiler, Can somebody please tell me what python really is and explain its architecture, in what problems it is used and from where should I start? -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie to python --- why should i learn !

2008-05-10 Thread Aahz
In article <[EMAIL PROTECTED]>, Gary Herron <[EMAIL PROTECTED]> wrote: > >With Python, you can program with a smile on your face. +1 QOTW >(Truly, when I found Python, programming became fun again.) "Again"? Looking back over the years, after I learned Python I realized that I never really

Books for a new generation of Pythoneers (was: Newbie to python --- why should i learn !)

2008-05-09 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, maxinbjohn <[EMAIL PROTECTED]> wrote: >Hi Raxit, > >One of the the tempting features of Python is that it is fun to code >in Python. If you are really trying to learn python, you should read >Adventures with Neko (http://gnuvision.com/books/pybook/) . It is an >intr

RE: Newbie to python --- why should i learn !

2008-05-09 Thread Sells, Fred
write working programs > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Behalf Of [EMAIL PROTECTED] > Sent: Thursday, May 08, 2008 6:25 AM > To: python-list@python.org > Subject: Newbie to python --- why should i learn ! > > > H

Re: Newbie to python --- why should i learn !

2008-05-09 Thread Marcelo de Moraes Serpa
I sincerely think that most languages in existence today have its place. Java has some great libraries and programs that were written in it. Try writing an Eclipse clone in Python, I don't think it would go well. On Fri, May 9, 2008 at 11:08 AM, hdante <[EMAIL PROTECTED]> wrote: > On May 8, 7:2

Re: Newbie to python --- why should i learn !

2008-05-09 Thread hdante
On May 8, 7:25 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > i was reading/learning some hello world program in python. > I think its very simillar to Java/C++/C#. What's different (except > syntax) ? All the languages have similar "power", in a theoretical sense. If you can solve

Re: Newbie to python --- why should i learn !

2008-05-09 Thread Bruno Desthuilliers
pistacchio a écrit : (snip) Technically speaking, it (Python) is not, for example, strongly typed, You're confusing "strong" typing with static typing. Somewhat orthogonal issues. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie to python --- why should i learn !

2008-05-09 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : Hi, i was reading/learning some hello world program in python. I think its very simillar to Java/C++/C#. Err... You saw a Python helloworld and a Java helloworld and you found them "very similar" ??? What's different (except syntax) ? dynamism (and not only w

Re: Newbie to python --- why should i learn !

2008-05-08 Thread Arnaud Delobelle
pistacchio <[EMAIL PROTECTED]> writes: > ocalm forces you to di OOP Ocaml *allows* you to do OOP. It's very much an optional feature of the language, just like for Python. -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie to python --- why should i learn !

2008-05-08 Thread Benjamin Kaplan
On Thu, May 8, 2008 at 6:25 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > > i was reading/learning some hello world program in python. > I think its very simillar to Java/C++/C#. What's different (except > syntax) ? > > what can i do easily with python which is not easy in c++/java !? >

Re: Newbie to python --- why should i learn !

2008-05-08 Thread Gary Herron
[EMAIL PROTECTED] wrote: Hi, i was reading/learning some hello world program in python. I think its very simillar to Java/C++/C#. What's different (except syntax) ? what can i do easily with python which is not easy in c++/java !? With Python, you can program with a smile on your face. (Tr

Re: Newbie to python --- why should i learn !

2008-05-08 Thread Marc 'BlackJack' Rintsch
On Thu, 08 May 2008 15:49:01 +0200, pistacchio wrote: > Marc 'BlackJack' Rintsch ha scritto: >> On Thu, 08 May 2008 04:17:01 -0700, s0suk3 wrote: >> >>> Are you a newbie to Python, or to programming in general? I'll assume >>> you are a newbi

Re: Newbie to python --- why should i learn !

2008-05-08 Thread pistacchio
Marc 'BlackJack' Rintsch ha scritto: On Thu, 08 May 2008 04:17:01 -0700, s0suk3 wrote: Are you a newbie to Python, or to programming in general? I'll assume you are a newbie to programming in general because of that last question you asked. Things in Python are easier than in a

Re: Newbie to python --- why should i learn !

2008-05-08 Thread Marc 'BlackJack' Rintsch
On Thu, 08 May 2008 04:17:01 -0700, s0suk3 wrote: > Are you a newbie to Python, or to programming in general? I'll assume > you are a newbie to programming in general because of that last > question you asked. Things in Python are easier than in almost any > other programming l

Re: Newbie to python --- why should i learn !

2008-05-08 Thread Eduardo O. Padoan
On Thu, May 8, 2008 at 7:25 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > > i was reading/learning some hello world program in python. > I think its very simillar to Java/C++/C#. What's different (except > syntax) ? > > what can i do easily with python which is not easy in c++/java !

Re: Newbie to python --- why should i learn !

2008-05-08 Thread Krishnakant Mane
hello, I have programmed co insidentally in all the 3 languages. so out of my experience of 10 + years, I got my personal share of reasons to prefer python over the other 2 namely c++ and java. firstly as every one has already explained, python is easy, fun to learn and can do many things much prod

Re: Newbie to python --- why should i learn !

2008-05-08 Thread cokofreedom
C# using System; namespace HelloWorld { Class HelloWorld { static void Main(String[] args) { Console.WriteLine("Hello World"); } } } -- http://mail.python.org/mailman/listinfo/python-list

RE: Newbie to python --- why should i learn !

2008-05-08 Thread Mark Jordaan
pls dont learn it Move on The world is full enough of 9 to 5 coders Mark> From: [EMAIL PROTECTED]> Subject: Newbie to python --- why should i learn !> Date: Thu, 8 May 2008 03:25:17 -0700> To: python-list@python.org> > Hi,> > i was reading/learning some hello wor

Re: Newbie to python --- why should i learn !

2008-05-08 Thread maxinbjohn
Hi Raxit, One of the the tempting features of Python is that it is fun to code in Python. If you are really trying to learn python, you should read Adventures with Neko (http://gnuvision.com/books/pybook/) . It is an introductory book on Python programming for school children by Mr. Pramode CE. I

Re: Newbie to python --- why should i learn !

2008-05-08 Thread pistacchio
[EMAIL PROTECTED] ha scritto: Hi, i was reading/learning some hello world program in python. I think its very simillar to Java/C++/C#. What's different (except syntax) ? well, it's similar in the sense that it is a programming language. So you can say that assembly is similar to BASIC, but t

Re: Newbie to python --- why should i learn !

2008-05-08 Thread s0suk3
ch is not easy in c++/java !? > Are you a newbie to Python, or to programming in general? I'll assume you are a newbie to programming in general because of that last question you asked. Things in Python are easier than in almost any other programming language. Her

Re: Newbie to python --- why should i learn !

2008-05-08 Thread A.T.Hofkamp
On 2008-05-08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > > i was reading/learning some hello world program in python. > I think its very simillar to Java/C++/C#. What's different (except > syntax) ? Yes, and all programs that people write typically look like the hello world program. Loo

Re: newbie to python

2005-12-16 Thread Johhny
Thankyou, I appreciate your help. I did not realise that python would behave that way. -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie to python

2005-12-16 Thread Peter Otten
Johhny wrote: > Here is the script then the problem. > > cat testing.py > > import crypt > import random, string > def getsalt(chars = string.letters + string.digits): > return random.choice(chars) + random.choice(chars) > username = raw_input('password : ') > print crypt.crypt(username,get

Re: newbie to python

2005-12-16 Thread Johhny
Hello, Here is the script then the problem. cat testing.py import crypt import random, string def getsalt(chars = string.letters + string.digits): return random.choice(chars) + random.choice(chars) username = raw_input('password : ') print crypt.crypt(username,getsalt()) python testing.py

Re: newbie to python

2005-12-15 Thread Lawrence Oluyede
Il 2005-12-15, Johhny <[EMAIL PROTECTED]> ha scritto: >>From a dpkg --list python* I have > > ii python2.4-crypto > 2.0+dp1-2ubuntu1 cryptographic > algorithms and protocols for Python > > Which means it should work. However Im not really getting anything from >

Re: newbie to python

2005-12-15 Thread Johhny
Hello, If I go into the python shell and type help("modules") It does show that crypt is there. However Im unsure if that means that there is help or its got the module installed. >From a dpkg --list python* I have ii python2.4-crypto 2.0+dp1-2ubuntu1 cryptog

Re: newbie to python

2005-12-15 Thread Lawrence Oluyede
Il 2005-12-15, [EMAIL PROTECTED] <[EMAIL PROTECTED]> ha scritto: > How do I find out what modules have been included in my python install? Look in site-packages directory > I am having issues with crypt functions not working on ubuntu or redhat > but they work on Slackware. Crypt functions? Are

newbie to python

2005-12-15 Thread exter_c
Hello, How do I find out what modules have been included in my python install? I am having issues with crypt functions not working on ubuntu or redhat but they work on Slackware. Any assistance would be great. Regards, Johhny. -- http://mail.python.org/mailman/listinfo/python-list