QOTW: In short, it's never what you think it is ;-) - timbot,
probably on the subject of performance
Real efficiency comes from elegant solutions, not optimized programs.
Optimization is always just a few correctness-preserving transformations
away. - Jonathan Sobel
On Sun, 25 Jun 2006 20:11:22 +0200, Anton van Straaten
[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
In this context, the term latently-typed language refers to the
language that a programmer experiences, not to the subset of that
language which is all that we're typically able to
I can't figure out why my code is not working. I thought I had the list
copied correctly:
Here is my code:
a=[[u'HF', []], [u')F', [u'75']], [u'RE', []], [u'C', []]]
b=a[:]
for index in reversed(range(0,len(a)-1)):
if '75' in b[index][1]:
b[index][1].remove('75')
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496746
[EMAIL PROTECTED] wrote:
Hello, I am writing a pure-Python game engine that interprets the code
of game objects within the same process with the exec statement. My
main goal is to make as much power available as possible and exec
Chris Smith wrote:
What makes static type systems interesting is not the fact that these
logical processes of reasoning exist; it is the fact that they are
formalized with definite axioms and rules of inference, performed
entirely on the program before execution, and designed to be entirely
faulkner wrote:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496746
Thanks! I was searching everywhere but couldn't find the right terms, I
guess.
--
http://mail.python.org/mailman/listinfo/python-list
John Thingstad wrote:
On Sun, 25 Jun 2006 20:11:22 +0200, Anton van Straaten
[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
...
\sarcasm One step further, and somebody starts calling C a latently
memory-safe language, because a real programmer knows that his code
is in a safe
Hi,
if u check the id's of a and b lists and also its elements, you will
obeserve that the id's of a and b have changed but id's of their
elements have not changed.
If you make a deep copy of the list a and then make your changes in
that list, it shud work. this can be done using the copy
[EMAIL PROTECTED] wrote:
Hi, is there a way in python to place some sort of keyboard() type
statement which stops the script and puts you back at the console?
see the third example on this page:
http://effbot.org/librarybook/code.htm
/F
--
Joachim Durchholz wrote:
Anton van Straaten schrieb:
Marshall wrote:
Can you be more explicit about what latent types means?
Sorry, that was a huge omission. (What I get for posting at 3:30am.)
The short answer is that I'm most directly referring to the types in
the programmer's
On 2006-06-26, Serge Orlov [EMAIL PROTECTED] wrote:
On 25 Jun 2006 21:19:18 -0700, arvind [EMAIL PROTECTED] wrote:
I am going to work on Python 2.4.3 and MSSQL database server on
Windows platform.
The module you're looking for is the first result if you search
python mysql on google or if
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Alex Martelli) wrote:
... let's try some google searches and see the number of million hits...:
But how reliable are those estimates of numbers of hits, anyway? More
than once I've got a page showing something like Results 1 - 10 of
about 36
In article [EMAIL PROTECTED],
Mirco Wahab [EMAIL PROTECTED] wrote:
C++ programming requires you to massively invest your thinking
first into the setup of your build environment ...
I don't understand why. It's easy enough to build small programs with a
single g++ command.
--
Hi !
See this shortened, simplified example. It is not working, but I don't
understand why...
# Client Process
import os, sys
from subprocess import Popen, PIPE
from time import sleep, time
from cPickle import loads, dumps
from binascii import hexlify, unhexlify
from base64 import
MrBlueSky wrote:
Hello! I've just finished working on my first Python app (a
Tkinter-based program that displays the content of our application log
files in graphical format). It was a great experience that's had a
very positive response from my colleagues.
So I'd like to try something
manstey wrote:
for index in reversed(range(0,len(a)-1)):
if '75' in b[index][1]:
b[index][1].remove('75')
b[index][1].append('99')
What on earth is all that messing around in the for loop intended to do? If
you want a range from len(a)-2 to 0 inclusive then just do it in
Rob Thorpe [EMAIL PROTECTED] writes:
I think statements like this are confusing, because there are
different interpretations of what a value is.
But I mean the value as the semantics of the program itself sees it.
Which mostly means the datum in memory.
I don't agree with that. Generally,
Richard Jones wrote:
spiffy wrote:
Congrats to Seth Yastrov for 'gravity.py' ... THE ONLY ONE THAT
WORKED!
I did test that they all worked on my machine before putting them
online...
What issues are you having? What OS?
The only issue I found is that goop dies with IndexError: list
Anton van Straaten [EMAIL PROTECTED] wrote:
I'm not trying to call programmer reasoning in general a type system.
I'd certainly agree that a programmer muddling his way through the
development of a program, perhaps using a debugger to find all his
problems empirically, may not be reasoning
This allows somethings to run eg
AxonVisualiser.py --navelgaze
but I'm not sure if the results are really unaffected by not having a
real yielder. The diagram appears, but doesn't seem to settle down.
I don't think the AxonVisualiser would be particularly affected by
this - any wobbling
Lawrence D'Oliveiro wrote:
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Alex Martelli) wrote:
... let's try some google searches and see the number of million
hits...:
But how reliable are those estimates of numbers of hits, anyway? More
than once I've got a page showing something
[EMAIL PROTECTED] wrote:
Hi, is there a way in python to place some sort of keyboard() type
statement which stops the script and puts you back at the console? I'm
looking for something like in matlab, where you place a keyboard()
command (I think), then you're in debug mode in the console,
[EMAIL PROTECTED] wrote:
(snip)
Two additional questions though: 1) is there a way for a function to
get a reference to its caller automatically (as in, without the caller
having to pass it in)?
It's possible with sys._getframe() and a decorator - but consider it a
hack.
and 2) what's the
Jason wrote:
I believe what you are trying to do is something like the following.
[code]
def isIntLike(x):
try:int(x)
except: return False
*Never* ever use a bare except clause. *Always* specify wich exceptions
you are expecting. (NB : here, TypeError and ValueError).
(NB
Is it better to do:
message = This is line1.
This is line2
This is line3\n
or
message = This is line1.\n
message = message + This is line2\n
message = message + This is line3\n
Since the first method does not follow python's clean and easy looking
indentation structure but the second just
Harry wrote:
Hi All,
(snip)
I have the following object which is like a list of tuples
row= [('name', 'x1'), ('min', 15.449041129349528), ('max',
991.6337818245629), ('range', 976.18474069521335), ('mean',
496.82174193958127), ('stddev', 304.78275004920454), ('variance',
Hari Sekhon wrote:
Is it better to do:
message = This is line1.
This is line2
This is line3\n
or
message = This is line1.\n
message = message + This is line2\n
message = message + This is line3\n
Is there any reason you can't do it in one line?
message = This is line1.\nThis is
MTD wrote:
Hari Sekhon wrote:
Is it better to do:
message = """This is line1.
This is line2
This is line3\n"""
or
message = "This is line1.\n
message = message + "This is line2\n"
message = message + "This is line3\n"
Is there any reason you can't do it in one line?
I can't give much answers, I am not that expert yet.
Bruno Desthuilliers:
newstyle classes can do whatever oldstyle classes
did, *and much more* (descriptors and usable
metaclasses) - and they are somewhat faster too.
In the past I have done few tests, and it seemed that new style classes
are
Hari Sekhon wrote:
Is it better to do:
message = This is line1.
This is line2
This is line3\n
or
message = This is line1.\n
message = message + This is line2\n
message = message + This is line3\n
Since the first method does not follow python's clean and easy looking
indentation
Frank Millman wrote:
How about
message = (This is line1.
This is line2
This is line3\n)
The brackets mean that the lines are automatically treated as
continuous, without the need for the ugly '\' continuation character.
The opening/closing
Hari Sekhon wrote:
Is it better to do:
message = This is line1.
This is line2
This is line3\n
or
message = This is line1.\n
message = message + This is line2\n
message = message + This is line3\n
Since the first method does not follow python's clean and easy looking
Frank Millman wrote:
How about
message = (This is line1.
This is line2
This is line3\n)
The brackets mean that the lines are automatically treated as
continuous, without the need for the ugly '\' continuation character.
The opening/closing
Chris Smith [EMAIL PROTECTED] writes:
I've since abandoned any attempt to be picky about use of the word
type. That was a mistake on my part. I still think it's legitimate
to object to statements of the form statically typed languages X, but
dynamically typed languages Y, in which it is
Fredrik Lundh wrote:
Frank Millman wrote:
How about
message = (This is line1.
This is line2
This is line3\n)
The brackets mean that the lines are automatically treated as
continuous, without the need for the ugly '\' continuation
Thus spoke Lawrence D'Oliveiro (on 2006-06-26 09:21):
In article [EMAIL PROTECTED],
Mirco Wahab [EMAIL PROTECTED] wrote:
C++ programming requires you to massively invest your thinking
first into the setup of your build environment ...
I don't understand why. It's easy enough to build
Hari Sekhon wrote:
Since the first method does not follow python's clean and easy looking
indentation structure but the second just looks crude and ugly anyway.
If you want indented and pretty is important to you:
from textwrap import dedent as D
message = D(\
This is line1.
Chris Smith [EMAIL PROTECTED] writes:
Joachim Durchholz [EMAIL PROTECTED] wrote:
Assume a language that
a) defines that a program is type-correct iff HM inference establishes
that there are no type errors
b) compiles a type-incorrect program anyway, with an establishes
rigorous semantics
Hi all!
Michael Hudson wrote:
The PyPy development team has been busy working and we've now packaged
our latest improvements, completed work and new experiments as
version 0.9.0, our fourth public release.
Unfortunately the download links for the release tarballs did not work
until very
Anton van Straaten [EMAIL PROTECTED] writes:
But a program as seen by the programmer has types: the programmer
performs (static) type inference when reasoning about the program, and
debugs those inferences when debugging the program, finally ending up
with a program which has a perfectly good
Gabriel Dos Reis wrote:
[EMAIL PROTECTED] writes:
| think that it is too relevant for the discussion at hand. Moreover,
| Harper talks about a relative concept of C-safety.
Then, I believe you missed the entire point.
I think the part of my reply you snipped addressed it well enough.
I can't remember the proposal number, but many of you reading will have
probably read the features that will be added to python 2.5. The actual
part I wanted to talk about was the finally part of try. Isn't it
totally defeating a compiler's job by executing the finally part even
if there is an
arvind wrote:
Hi all,
I am going to work on Python 2.4.3 and MSSQL database server on
Windows platform.
But I don't know how to make the connectivity or rather which module to
import.
I searched for the modules in the Python library, but I couldn't find
which module to go for.
Please
Hi,
defcon8 wrote:
I can't remember the proposal number, but many of you reading will have
probably read the features that will be added to python 2.5. The actual
part I wanted to talk about was the finally part of try. Isn't it
totally defeating a compiler's job by executing the finally
No response yet. The SWIG test works fine in Linux no problems.
However, I still have the problem in Cygwin.
Also, not sure if related but I do have a win32 Python 2.4.3 and
Cygwin Python 2.4.1. Not sure if there are any conflicts. Any advice
in making these two co-exist?
The only C/C++
Hi,
I need to re-write a VB script into Python (because I really don't like
VB).
The VB script is used to create a Windows COM object.
(I am more of Unix guy, so COM objects are a little bit alien for me).
At a certain point in the VB script, I have the following line:
objPolTypes =
defcon8 wrote:
I can't remember the proposal number,
http://docs.python.org/dev/whatsnew/pep-341.html
but many of you reading will have
probably read the features that will be added to python 2.5. The actual
part I wanted to talk about was the finally part of try.
It has been here from the
hi
is there something like an automatic debugger module available in
python? Say if i enable this auto debugger, it is able to run thru the
whole python program, print variable values at each point, or print
calls to functions..etc...just like the pdb module, but now it's
automatic.
thanks
--
defcon8 wrote:
I can't remember the proposal number, but many of you reading will have
probably read the features that will be added to python 2.5. The actual
part I wanted to talk about was the finally part of try. Isn't it
totally defeating a compiler's job by executing the finally part even
Michael Yanowitz wrote:
Also, not sure if related but I do have a win32 Python 2.4.3 and
Cygwin Python 2.4.1. Not sure if there are any conflicts. Any advice
in making these two co-exist?
SWIG will work with the windows and cygwin python, just make sure you
don't mix the various platforms.
On 2006-06-23, Filip Wasilewski [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
Logically, I should be able to enter x[-2:-0] to get the last and next to
last characters. However, since Python doesn't distinguish between positive
and negative zero, this doesn't work. Instead, I have to
[EMAIL PROTECTED] writes:
is there something like an automatic debugger module available in
python? Say if i enable this auto debugger, it is able to run thru the
whole python program, print variable values at each point, or print
calls to functions..etc...just like the pdb module, but now
Bruno Desthuilliers wrote:
[EMAIL PROTECTED] wrote:
(snip)
Two additional questions though: 1) is there a way for a function to
get a reference to its caller automatically (as in, without the caller
having to pass it in)?
It's possible with sys._getframe() and a decorator - but
When I tried to update a class's __dict__, I got an error saying that
there is no 'update' attribute for dictproxy object. What is a
dictproxy object? I thought that __dict__ is always suppose to be a, no
kidding, dictionary? Hence there should indeed be an update method.
What's this proxy
[EMAIL PROTECTED] wrote:
When I tried to update a class's __dict__, I got an error saying that
there is no 'update' attribute for dictproxy object. What is a
dictproxy object?
a CPython implementation detail, used to protect an internal data structure used
by new-style objects from unexpected
Fredrik Lundh wrote:
[EMAIL PROTECTED] wrote:
When I tried to update a class's __dict__, I got an error saying that
there is no 'update' attribute for dictproxy object. What is a
dictproxy object?
a CPython implementation detail, used to protect an internal data structure
used
by
I have had what I think is quite a nice game idea, but I don't really
have the experience or knowledge to go about it. Would anyone be
willing to start a game project? The game I am thinking about is a
virtual IRC stock exchange. There will be a bot in the channel which
gets the live stock quotes
But I don't know how to make the connectivity or rather which module to
import.
Try mxODBC
http://www.egenix.com/files/python/mxODBC.html
--
http://mail.python.org/mailman/listinfo/python-list
Le lundi 26 juin 2006 16:06, [EMAIL PROTECTED] a écrit :
Fredrik Lundh wrote:
[EMAIL PROTECTED] wrote:
When I tried to update a class's __dict__, I got an error saying that
there is no 'update' attribute for dictproxy object. What is a
dictproxy object?
a CPython implementation
Hello--I'm using the threading module to accomplish some distributed processing on a project, and have a basic (I hope) question that I can't find an answer to elsewhere.I've noted that there's a lot of documentation saying that there is no external way to stop a thread, and yet when creating a
All right. Thanks for explaining that Maric.
Maric Michaud wrote:
Le lundi 26 juin 2006 16:06, [EMAIL PROTECTED] a écrit :
Fredrik Lundh wrote:
[EMAIL PROTECTED] wrote:
When I tried to update a class's __dict__, I got an error saying that
there is no 'update' attribute for dictproxy
Oliver Bandel [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Xah Lee wrote:
As far as i know, Java and JavaScript are languages with full, complete
unicode support. That is, they allow names to be defined using unicode.
Can you explain what you mena with the names here?
Is there a method or attribute I can use to get a list of classes
defined or in-use within my python program? I tried using pyclbr and
readmodule but for reason that is dogslow. Thanks in advance
DigiO
--
http://mail.python.org/mailman/listinfo/python-list
What's the best way to search a string for a particular word and get a
booleen value indicating whether it exists in the string or not?
Thanks...
--
http://mail.python.org/mailman/listinfo/python-list
Matthias Blume wrote:
I agree with Bob Harper about safety being language-specific and all
that. But, with all due respect, I think his characterization of C is
not accurate.
[...]
AFAIC, C is C-unsafe by Bob's reasoning.
Agreed.
Of course, C can be made safe quite easily:
Define a
What's the best way to search a string for a particular word and get a
booleen value indicating whether it exists in the string or not?
substring = 'foo'
targetstring = 'blah foo bar'
substring in targetstring
True
if substring in targetstring: print 'yup'
yup
2nd question:
[snip]
if x10 and y10 and z10 and summ(tritup(x,y,z)): print OK
Others have already suggested you use the built-in sum() function.
I'll suggest you don't need it at all, because it is redundant.
If the sum is zero, either all three values are zero or at least one of
the
Thankyou everyone for help last time:
The following works ok when setting a
wx.lib.buttons.GenBitmapTextButton's disabled bitmap in using wxpython
instead of this:
self.b1.SetBitmapDisabled(self.yellow)
i can use this:
aaa = 1
result1 = eval(self.b%s.SetBitmapDisabled(self.yellow) % aaa)
result
I thought I'd seen that somewhere! Thanks Tim. I was previously using
re.search(substring, targetstring).
Tim Chase wrote:
What's the best way to search a string for a particular word and get a
booleen value indicating whether it exists in the string or not?
substring = 'foo'
Lawrence D'Oliveiro [EMAIL PROTECTED] wrote:
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Alex Martelli) wrote:
... let's try some google searches and see the number of million hits...:
But how reliable are those estimates of numbers of hits, anyway? More
than once I've got a page
Hi all!
Michael Hudson wrote:
The PyPy development team has been busy working and we've now packaged
our latest improvements, completed work and new experiments as
version 0.9.0, our fourth public release.
Unfortunately the download links for the release tarballs did not work
until very
QOTW: In short, it's never what you think it is ;-) - timbot,
probably on the subject of performance
Real efficiency comes from elegant solutions, not optimized programs.
Optimization is always just a few correctness-preserving transformations
away. - Jonathan Sobel
David Hopwood [EMAIL PROTECTED] writes:
Matthias Blume wrote:
I agree with Bob Harper about safety being language-specific and all
that. But, with all due respect, I think his characterization of C is
not accurate.
[...]
AFAIC, C is C-unsafe by Bob's reasoning.
Agreed.
Of course, C can
Is there a method or attribute I can use to get a list of
classes defined or in-use within my python program? I tried
using pyclbr and readmodule but for reason that is dogslow.
Well, given that so much in python is considered a class, the
somewhat crude code below walks an object/module and
The odbc module is part of the Python Standard Library. So you can
search for docs on using it in the Python2x.chm help file (or the HTML
version of the same docs) that comes with the Windows Python
disttribution. Its quite easy to use ODBC from Python, at least for
simple tasks like select *
And what if I want to search for an item in a tuple, is there a
similarly easy method?
Tim Chase wrote:
What's the best way to search a string for a particular word and get a
booleen value indicating whether it exists in the string or not?
substring = 'foo'
targetstring = 'blah foo
Hari Sekhon wrote:
Is it better to do:
message = This is line1.
This is line2
This is line3\n
or
message = This is line1.\n
message = message + This is line2\n
message = message + This is line3\n
Since the first method does not follow python's clean and easy looking
David Hopwood [EMAIL PROTECTED] wrote:
Marshall wrote:
David Hopwood wrote:
A type system that required an annotation on all subprograms that
do not provably terminate, OTOH, would not impact expressiveness
at all, and would be very useful.
Interesting. I have always imagined doing this by
Wow, more than I had asked for, thank you Tim!
I ended up doing this:
def isClass(object):
if 'classobj' in str(type(object)):
return 1
elif 'type' in str(type(object)):
return 1
else:
return 0
def listClasses():
classes = []
for eachobj in
In article [EMAIL PROTECTED],
Mirco Wahab [EMAIL PROTECTED] wrote:
Thus spoke Cameron Laird (on 2006-06-25 13:08):
I'll gratuitously add that, even though I'm personally fond of
C++, I think teaching it as is done in colleges and high schools
(!) amounts to child abuse. It's wildly
Le lundi 26 juin 2006 17:25, Tim Chase a écrit :
I couldn't find any nice
method for determining if a variable referenced a module other
than checking to see if that item had both a __file__ and a
__name__ attribute.
Why not :
In [8]: import types, sys
In [9]: isinstance(sys,
On 26 Jun 2006 08:24:54 -0700, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
And what if I want to search for an item in a tuple, is there a
similarly easy method?
Tim Chase wrote:
What's the best way to search a string for a particular word and get a
booleen value indicating whether it
I couldn't find any nice method for determining if a
variable referenced a module other than checking to see if
that item had both a __file__ and a __name__ attribute.
Why not :
In [8]: import types, sys
In [9]: isinstance(sys, types.ModuleType)
Out[9]: True
Yes...this is the best way
How can an object replace itself using its own method? See the
following code:
class Mixin:
def mixin(object, *classes):
NewClass = type('Mixin', (object.__class__,) + classes, {})
newobj = NewClass()
newobj.__dict__.update(object.__dict__)
return newobj
def
Hey, just a quick note... when I visit http://pyweek.org I get a
message that the site is not configured. www.pyweek.org works as
expected. When I received this e-mail my e-mail client made pyweek.org
clickable which is how I noticed the problem.
On 6/25/06, [EMAIL PROTECTED] [EMAIL PROTECTED]
Thank you thank you!
Tim Williams wrote:
On 26 Jun 2006 08:24:54 -0700, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
And what if I want to search for an item in a tuple, is there a
similarly easy method?
Tim Chase wrote:
What's the best way to search a string for a particular word and
Marshall wrote:
I stand corrected: if one is using C and writing self-modifying
code, then one *can* zip one's pants.
Static proofs notwithstanding, I'd prefer a dynamic check just prior to
this operation.
I want my code to be the only self-modifying thing around here.
--
[EMAIL PROTECTED] wrote:
Bruno Desthuilliers wrote:
[EMAIL PROTECTED] wrote:
(snip)
and 2) what's the reason to use newstyle classes
versus the old?
All this is explained on python.org (there's a menu entry for this in
the documentation menu). AFAICT, newstyle classes can do whatever
oldstyle
Le lundi 26 juin 2006 17:57, [EMAIL PROTECTED] a écrit :
How can an object replace itself using its own method? See the
following code:
class Mixin:
def mixin(object, *classes):
NewClass = type('Mixin', (object.__class__,) + classes, {})
newobj = NewClass()
David Hopwood wrote:
Joe Marshall wrote:
I do this quite often. Sometimes I'll develop `in the debugger'. I'll
change some piece of code and run the program until it traps. Then,
without exiting the debugger, I'll fix the immediate problem and
restart the program at the point it
[EMAIL PROTECTED] wrote:
How can an object replace itself using its own method?
AFAIK, It can't (but I can be wrong - some guru around ?).
See the
following code:
class Mixin:
def mixin(object, *classes):
NewClass = type('Mixin', (object.__class__,) + classes, {})
Maric Michaud wrote:
Le lundi 26 juin 2006 17:57, [EMAIL PROTECTED] a écrit :
How can an object replace itself using its own method? See the
following code:
class Mixin:
def mixin(object, *classes):
NewClass = type('Mixin', (object.__class__,) + classes, {})
Claudio Grondi wrote:
clever stuff to di indentation
When necessary to skip first line _and_ indentation:
message =
This is line 1
This is line 2
This is line 3
.replace('\n ', '\n')[1:] # adjust here '\n ' to indentation
Riffing on this idea:
message =
I am doing alot of reading and trying to teach myself how to program.
I can not figure out how to make Write a program that continually
reads in numbers from the user and adds them together until the sum
reaches 100. this work. If someone could show me the correct code so i
can learn from that it
Bruno Desthuilliers wrote:
[EMAIL PROTECTED] wrote:
How can an object replace itself using its own method?
AFAIK, It can't (but I can be wrong - some guru around ?).
...
FWIW:
Python 2.4.3 (#1, Jun 3 2006, 17:26:11)
[GCC 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)] on linux2
What's New?
===
The talk schedule for the Vancouver Python Workshop is now available:
http://www.vanpyz.org/conference/talkschedule.html
This years line-up might be even stronger than in 2004, so check it out!
About the Vancouver Python Workshop
===
The
[EMAIL PROTECTED] wrote:
I am doing alot of reading and trying to teach myself how to program.
I can not figure out how to make Write a program that continually
reads in numbers from the user and adds them together until the sum
reaches 100. this work. If someone could show me the correct code
Claudio Grondi wrote:
[EMAIL PROTECTED] wrote:
I am doing alot of reading and trying to teach myself how to program.
I can not figure out how to make Write a program that continually
reads in numbers from the user and adds them together until the sum
reaches 100. this work. If someone
[EMAIL PROTECTED] wrote:
Claudio Grondi wrote:
[EMAIL PROTECTED] wrote:
I am doing alot of reading and trying to teach myself how to program.
I can not figure out how to make Write a program that continually
reads in numbers from the user and adds them together until the sum
I am doing alot of reading, and the problem didnt come with an answer.
I dont understand how to get it to continually input numbers and add
all those together
Use while, raw_input, sys.argv[1] and int() and break the loop when the
sum is above 100.
;-)
--
1 - 100 of 240 matches
Mail list logo