On Wed, 10/23/13, Steven D'Aprano st...@pearwood.info wrote:
Subject: Re: [Tutor] Beginner Question
To: tutor@python.org
Date: Wednesday, October 23, 2013, 5:27 AM
On Tue, Oct 22, 2013 at 04:25:59PM
+0200, Sven Hennig wrote:
Hello, I would
On 23 October 2013 08:58, Albert-Jan Roskam fo...@yahoo.com wrote:
So the built-in 'len()' is *really* a function, but calls to len()
implemented by __len__ are method calls *disguised* as function calls? I
sometimes find it easier to write calls to special methods the normal way,
e.g.
On 23/10/13 08:25, Corinne Landers wrote:
Hi guys,
I need a bit of help.
I'm writing a class, and in the main function I'm trying to say if this
method gets called, do this.
What you are actually doing is if the method returns
a truth-like value do this. Not quite the same thing,
but much
On 23 October 2013 08:25, Corinne Landers corinne.land...@live.com wrote:
Hi guys,
Hi Corrine,
I need a bit of help.
I'm writing a class, and in the main function I'm trying to say if this
method gets called, do this.
I'm trying things like:
program = AnimalClass(x,y,z)
for i in
On 23/10/2013 03:25, Corinne Landers wrote:
--/style/head
body class='hmmessage'div dir='ltr'Hi guys,nbsp;divbr/divdivI
need a bit of help.nbsp;/divdivI'm writing a class, and in the main
function I'm trying to say if this method gets called, do
this.nbsp;/divdivI'm trying things
On 22/10/13 15:25, Sven Hennig wrote:
Hello, I would like to learn a programming language and have decided to
use Python. I have some programming experience and doing well in Python.
What really causes me problems is OOP.
Don't worry this is common.
The problem with OOP is that it only really
On Tue, Oct 22, 2013 at 10:25 AM, Sven Hennig shenni...@googlemail.comwrote:
Hello, I would like to learn a programming language and have decided to
use Python. I have some programming experience and doing well in Python.
What really causes me problems is OOP.
I'm just dont get it... I'm
On 22/10/2013 10:25, Sven Hennig wrote:
Hello, I would like to learn a programming language and have decided to use
Python. I have some programming experience and doing well in Python. What
really causes me problems is OOP.
I'm just dont get it... I'm missing a really Practical example. In
Thank you! You guys helped me out alot.
@Alan your website is great! Really clearly written. Especially the Things
to remember part.
If you have exercises for me or have a Website with exercises, bring it on. I
think this is the best way to learn.
2013/10/22 Dave Angel da...@davea.name
On
On 22/10/13 19:18, Sven Hennig wrote:
Thank you! You guys helped me out alot.
@Alan your website is great! Really clearly written. Especially the
Things to remember part.
Glad you like it. Someday (soon!) I'll get round to finishing
the v3 version... So much to do, so little time!
If you
On Tue, Oct 22, 2013 at 04:25:59PM +0200, Sven Hennig wrote:
Hello, I would like to learn a programming language and have decided to use
Python. I have some programming experience and doing well in Python. What
really causes me problems is OOP.
I'm just dont get it... I'm missing a really
On 10 Aug 2013, at 04:30, eschneide...@comcast.net wrote:
I've been learning python from the website 'inventwithpython.com', and I'm on
a chapter that covers the following code:
import random
import time
def displayIntro():
print('You are in a land full of dragons. In front of you,')
On 12 August 2013 02:14, Karim Liateni kliat...@gmail.com wrote:
5ÿt5ÿ6hhhyyyfrrtr
eschneide...@comcast.net a écrit :
I've been learning python from the website 'inventwithpython.com', and
I'm on a chapter that covers the following code:
Just a quick note - not on the algorithm itself. If
def checkCave(chosenCave):
print('You approach the cave...')
time.sleep(2)
print('It is dark and spooky...')
time.sleep(2)
print('A large dragon jumps out in front of you! He opens his jaws
and...')
print()
time.sleep(2)
friendlyCave = random.randint(1, 2)
if
But in the code there is a flaw. input() will evaluate your user input.
i.e. If you give an integer expression it will tell the answer. And when
you provide a number it will take it as int type. See below.
Hi,
Ignore my above statements if using Python 3. Sorry my bad. Had a doubt and
went to
On 10/08/13 04:30, eschneide...@comcast.net wrote:
I've been learning python from the website 'inventwithpython.com', and
I'm on a chapter that covers the following code:
import random
import time
def displayIntro():
print('You are in a land full of dragons. In front of you,')
print('you
On 01-Nov-11 08:34, Mayo Adams wrote:
When writing a simple for loop like so:
for x in f
where f is the name of a file object, how does Python know to interpret
the variable x as a line of text, rather than,say, an individual
character in the file? Does it automatically
treat text files
Steve Willoughby wrote:
On 01-Nov-11 08:34, Mayo Adams wrote:
When writing a simple for loop like so:
for x in f
where f is the name of a file object, how does Python know to interpret
the variable x as a line of text, rather than,say, an individual
character in the file? Does it
Mayo Adams wrote:
When writing a simple for loop like so:
for x in f
where f is the name of a file object, how does Python know to interpret
the variable x as a line of text, rather than,say, an individual character
in the file? Does it automatically
treat text files as sequences of
* Ismael Garrido [EMAIL PROTECTED] [2006-06-18 19:34]:
Alan Gauld wrote:
Also, does anyone know of a PDA that would run python?
There was a project called pippy, but I haven't heard anything of it
recently so I don't know if its still around or if it runs on modern
PDAs - I
message = raw_input(Enter your message:)
for i in range(len(message)-1,-1, -1):
print i,
but I just get the numeric values of the string. Can anyone help?
As an alternative approach consider converting to a list and
using the reverse method...
Also, does anyone know of a PDA that
Alan Gauld wrote:
Also, does anyone know of a PDA that would run python?
There was a project called pippy, but I haven't heard anything of it
recently so I don't know if its still around or if it runs on modern
PDAs - I think it was PalmOS anyhow...
Pippy is quite dead. No
On 6/18/06, Josh F [EMAIL PROTECTED] wrote:
re. Beginner QuestionI'm still in the fairly early stages of learning Python, but I have anintermediate level of HTML, CSS, and VB6 knowledge along with thefundamentals of C and C++ and a very little bit of PERL..
But enough about me...Here's the
Also, does anyone know of a PDA that would run python?
Some of the new Nokias run python: http://www.forum.nokia.com/python
--
John.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
From: Jesse [EMAIL PROTECTED]
I tried redefining the higher-order variables as functions, but it didn't
quite work. Here's a simplified example:
var1 = 2
def timestwo(x):
return x*2
var2 = timestwo(var1)
print var1, var2
var1 = 3
print var1, var2
This results in the
I tried redefining the higher-order variables as functions, but it
didn't quite work. Here's a simplified example:
var1 = 2
def timestwo(x):
return x*2
var2 = timestwo(var1)
print var1, var2
var1 = 3
print var1, var2
Try:
##
print 2, timestwo(2)
print 3, timestwo(3)
##
..which is not what I'm aiming for. Maybe I'll have to follow Bob's
advice and just store all of the variable assignments in a function,
and then call the function every time I change one of the variables
(based on user input). I could still leave the higher-order variables
as functions
On Fri, 7 Apr 2006, Jesse wrote:
Why is it that when one variable is assigned a value in terms of another
variable, assigning a new value to the first doesn't change the value of
the second?
Hi Jesse,
If you have a variable that depends on the values of other parameters,
that's just
Jesse wrote:
Why is it that when one variable is assigned a value in terms of
another variable, assigning a new value to the first doesn't change
the value of the second? This is giving me a huge headache, since I
have a bunch of variables defined in terms of one another, and I want
to be
-- Forwarded message --
Date: Fri, 7 Apr 2006 21:05:33 -0600
From: Jesse [EMAIL PROTECTED]
To: Danny Yoo [EMAIL PROTECTED]
Subject: Re: [Tutor] Beginner question (variables, namespaces...)
I tried redefining the higher-order variables as functions, but it didn't
quite work
30 matches
Mail list logo