On 31Mar2017 16:12, 2019.cavanau...@fpsedu.org <2019.cavanau...@fpsedu.org>
wrote:
Hello I've been coding for about 1 or 2 months and i have encountered a problem
with a 'while' statement. It keeps looping even when the statement is false,
here is the code. The code is for a game that I'm maki
On Fri, Mar 31, 2017 at 4:16 PM <2019.cavanau...@fpsedu.org> wrote:
> while answer8 != ("1") or answer8 != ("2"):
This statement is always true. Think about it.
>
>
--
https://mail.python.org/mailman/listinfo/python-list
On 3/31/2017 7:12 PM, 2019.cavanau...@fpsedu.org wrote:
Hello I've been coding for about 1 or 2 months
If at all possible, start with 3.6, not 3.1.
and i have encountered a problem with a 'while' statement.
You should assume that your code is buggy. That is true even of experts.
> It keep
Hello I've been coding for about 1 or 2 months and i have encountered a problem
with a 'while' statement. It keeps looping even when the statement is false,
here is the code. The code is for a game that I'm making that resembles the
Oregon Trial.
-Thanks for your help!
import random
deep =
On Friday, November 20, 2015 at 11:06:05 PM UTC, Rob Gaddi wrote:
> On Fri, 20 Nov 2015 15:15:42 -0500, Terry Reedy wrote:
>
> > On 11/20/2015 12:22 PM, Dylan Riley wrote:
> >> This is my fortune cookie program i wrote in python.
> >> the problem is it will not run past the first line of input.
>
On Fri, 20 Nov 2015 15:15:42 -0500, Terry Reedy wrote:
> On 11/20/2015 12:22 PM, Dylan Riley wrote:
>> This is my fortune cookie program i wrote in python.
>> the problem is it will not run past the first line of input.
>> could someone please identify the error and explain to me why.
>> here is t
On Fri, 20 Nov 2015 09:22:10 -0800 (PST), Dylan Riley
wrote:
>This is my fortune cookie program i wrote in python.
>the problem is it will not run past the first line of input.
>could someone please identify the error and explain to me why.
>here is the code:
>
>#the program silulates a fortune c
On 11/20/2015 12:22 PM, Dylan Riley wrote:
This is my fortune cookie program i wrote in python.
the problem is it will not run past the first line of input.
could someone please identify the error and explain to me why.
here is the code:
#the program silulates a fortune cookie
#the program shoul
On Fri, Nov 20, 2015 at 10:57 AM, Peter Otten <__pete...@web.de> wrote:
> Dylan Riley wrote:
>
>> input("\nPress enter to see your fortune")
>
> Make sure that you run your code with Python 3, not Python 2.
Or if you must use Python 2, use raw_input() instead of input().
>> fortune = random.randr
Dylan Riley wrote:
> This is my fortune cookie program i wrote in python.
> the problem is it will not run past the first line of input.
> could someone please identify the error and explain to me why.
> here is the code:
>
> #the program silulates a fortune cookie
> #the program should display o
On Sat, Nov 21, 2015 at 4:22 AM, Dylan Riley wrote:
> This is my fortune cookie program i wrote in python.
> the problem is it will not run past the first line of input.
> could someone please identify the error and explain to me why.
> here is the code:
>
> #the program silulates a fortune cookie
This is my fortune cookie program i wrote in python.
the problem is it will not run past the first line of input.
could someone please identify the error and explain to me why.
here is the code:
#the program silulates a fortune cookie
#the program should display one of five unique fortunes, at ran
On Thursday, 2 August 2012 12:18:59 UTC+1, Peter Otten wrote:
> danielashi...@googlemail.com wrote:
>
>
>
> > This error has been bugging me for days. I know it's minor, but it's
>
> > really getting in the way of my programming. I'm programming a data
>
> > analysis programme for a psycholog
Let's go thorugh this program:
On 08/02/2012 12:58 PM, danielashi...@googlemail.com wrote:
> import cPickle, pickle
you probably want to transparently fall back to pickle if cPickle is not
available.
> print 'WELLCOME TO THE LIBET CLOCK EXPERIMENT DATA ANALYSIST'
> file=raw_input('\nPLEASE ENTER
On 08/02/2012 06:58 AM, danielashi...@googlemail.com wrote:
> Hi all
>
> This error has been bugging me for days. I know it's minor, but it's really
> getting in the way of my programming. I'm programming a data analysis
> programme for a psychology experiment which takes pickled data from the
>
Hi,
> This error has been bugging me for days.
Doesn't look like a tab error but:
> partifipant_info=data'Participant Info']
This line is wrong, it should be:
partifipant_info=data['Participant Info']
That's probably what's triggering the error!
Cheers,
]\/[arco
--
http://mail.python.org/ma
danielashi...@googlemail.com wrote:
> This error has been bugging me for days. I know it's minor, but it's
> really getting in the way of my programming. I'm programming a data
> analysis programme for a psychology experiment which takes pickled data
> from the experiment and produces averages. Fo
Hi all
This error has been bugging me for days. I know it's minor, but it's really
getting in the way of my programming. I'm programming a data analysis programme
for a psychology experiment which takes pickled data from the experiment and
produces averages. For some reason python is insisting
Hi,
Following is the in-function cursor object.
Code:import pgdb
__metaclass__=type
class addbook:
conn=pgdb.connect(dsn='localhost:secondbooks',user='postgres',password='postgres1')
curs=conn.cursor()
def addBook(self):
*infunction_curs=self.curs**
*
Hi,
Following is the in-function cursor object.
Code:import pgdb
__metaclass__=type
class addbook:
conn=pgdb.connect(dsn='localhost:secondbooks',user='postgres',password='postgres1')
curs=conn.cursor()
def addBook(self):
*infunction_curs=self.curs**
*
Aloha,
Andreas Lobinger wrote:
> Andreas Lobinger wrote:
>> Lawrence D'Oliveiro wrote:
>>> In message <[EMAIL PROTECTED]>, Andreas Lobinger wrote:
Anyone any idea where the error is produced?
> The registered Handler has to return a (integer) value.
> Would have been nice if this had been men
Aloha,
Andreas Lobinger wrote:
> Lawrence D'Oliveiro wrote:
>> In message <[EMAIL PROTECTED]>, Andreas Lobinger wrote:
>>> Anyone any idea where the error is produced?
... to share my findings with you:
def ex(self,context,baseid,n1,n2):
print "x",context,n1,n2
return 1
T
Aloha,
Lawrence D'Oliveiro wrote:
> In message <[EMAIL PROTECTED]>, Andreas Lobinger wrote:
>>Anyone any idea where the error is produced?
> Do you want to try adding an EndElementHandler as well, just to get more
> information on where the error might be happening?
I want.
Adding an EndElement
In message <[EMAIL PROTECTED]>, Andreas Lobinger wrote:
> Anyone any idea where the error is produced?
Do you want to try adding an EndElementHandler as well, just to get more
information on where the error might be happening?
--
http://mail.python.org/mailman/listinfo/python-list
Aloha,
i'm trying to write an xml filter, that extracts some info about
an .xml document (with external entities), esp. start elements and
external entities. The document is a DOCBOOK xml and afacs
well formed and passes our docbook toolchain (dblatex etc.).
My parser is (very simple):
[115] scyl
I have thrown together a script which reads a list or urls from a txt file and navigates to each url while recording how long it takes for the page to render completely using PAMIE. For some reason I randomly get crashes reporting:
File "c:\Python24\scripts\PAM.py", line 30, in IE_Invoke
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> sort, then groupby.
>
>
> import itertools
> import random
> h,t = [len(list(g)) for k,g in
itertools.groupby(sorted([random.randrange(2)
> for i in xrange(
DannyB said unto the world upon 21/02/06 06:14 PM:
> I'm just learning Python. I've created a simple coin flipper program -
> here is the code:
>
> [source]
> #Coin flipper
> import random
>
> heads = 0
> tails = 0
> counter = 0
>
> coin = random.randrange(2)
>
> while (counter < 100):
> i
wes weston wrote:
> DannyB wrote:
>
>> I'm just learning Python. I've created a simple coin flipper program -
...
> Dan,
>Looping is easier with:
> for x in range(100):
>if random.randint(0,1) == 0:
> heads += 1
>else:
> tails += 1
>
Or, continuing with that theme:
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> John Zenger wrote:
> > Also, with the functional programming tools of map, filter, and lambda,
> > this code can be reduced to just six lines:
> >
> > import random
> >
> > flips = map(lambda x: random.randrange(2), xrange(100))
> > he
John Zenger wrote:
> Also, with the functional programming tools of map, filter, and lambda,
> this code can be reduced to just six lines:
>
> import random
>
> flips = map(lambda x: random.randrange(2), xrange(100))
> heads = len(filter(lambda x: x is 0, flips))
> tails = len(filter(lambda x: x i
wes weston wrote:
>Looping is easier with:
> for x in range(100):
>if random.randint(0,1) == 0:
> heads += 1
>else:
> tails += 1
Also, with the functional programming tools of map, filter, and lambda,
this code can be reduced to just six lines:
import random
flips = map(
Thanks everyone for your insight.
I'm coming from C++ - I'm used to formatting code with {} instead of
whitespaces.
@Larry - this isn't my homework :P I'm actually taking a VB.NET class
in school.
I was teaching myself C++ but decided to scale back to Python. I've
heard it was a bit easier to
DannyB wrote:
> I'm just learning Python.
So am I :-)
> I've created a simple coin flipper program -
> here is the code:
>
> [source]
> #Coin flipper
> import random
>
> heads = 0
> tails = 0
> counter = 0
>
> coin = random.randrange(2)
>
> while (counter < 100):
> if (coin ==
DannyB wrote:
> I'm just learning Python. I've created a simple coin flipper program -
> here is the code:
>
> [source]
> #Coin flipper
> import random
>
> heads = 0
> tails = 0
> counter = 0
>
> coin = random.randrange(2)
>
> while (counter < 100):
> if (coin == 0):
> heads += 1
>
DannyB wrote:
> I'm just learning Python. I've created a simple coin flipper program -
> here is the code:
>
> [source]
> #Coin flipper
> import random
>
> heads = 0
> tails = 0
> counter = 0
>
> coin = random.randrange(2)
>
> while (counter < 100):
> if (coin == 0):
> heads += 1
>
DannyB wrote:
> I'm just learning Python. I've created a simple coin flipper program -
> here is the code:
>
> [source]
> #Coin flipper
> import random
>
> heads = 0
> tails = 0
> counter = 0
>
> while (counter < 100):
coin = random.randrange(2)
Claudio
> if (coin == 0):
>
On Tue, 2006-02-21 at 16:14 -0800, DannyB wrote:
> I'm just learning Python. I've created a simple coin flipper program -
> here is the code:
>
> [source]
> #Coin flipper
> import random
>
> heads = 0
> tails = 0
> counter = 0
>
> coin = random.randrange(2)
>
> while (counter < 100):
> if
I'm just learning Python. I've created a simple coin flipper program -
here is the code:
[source]
#Coin flipper
import random
heads = 0
tails = 0
counter = 0
coin = random.randrange(2)
while (counter < 100):
if (coin == 0):
heads += 1
counter += 1
else:
tails +=
39 matches
Mail list logo