Hi,
I'm busy with this tutorial
http://www.openbookproject.net/thinkCSpy/index.html
I need some feedback and help to be able to learn Python.
For instance, now I'm working on chapter 8, 8.13 exercise 1, 2 and 3. Code
become pretty complex for me there:
http://www.openbookproject.net/thinkCSpy/ch0
On 07/02/2010 08:19 PM, bob gailer wrote:
On 7/2/2010 5:56 PM, Jeff Johnson wrote:
[snip]
Visual FoxPro ... is very similar to Access
I differ. Access and FoxPro are very different. Yes they both use
tables, relationships, indexes and SQL. Yes they both have visual
designers for forms and
On 07/02/2010 06:51 PM, David Hutto wrote:
In the end, there might be so many packages, I might not be able to
handle it all(for my own uses). But, I would think, you would agree
that a simple account balance app, would be no more than tkinter with
a few functions to write and retrieve data from
On 07/02/2010 06:32 PM, David Hutto wrote:
On Fri, Jul 2, 2010 at 9:31 PM, David Hutto wrote:
Well, it was mainly that he said he was a beginner and was only using
this for a single banking project, I do believe.
Not that learning a new package would
wouldn't
be helpful, I like
On 07/02/2010 06:14 PM, David Hutto wrote:
Stick to the main python libraries(python with sqllite, and for the
standalone exe know it's somewhere, and I've seen it in the past few
days, but didn't pay attention because it wasn't important to what I
was doing at the time) going anywhere else is t
ginning to lose faith in being able to
get help from the Dabo mailing list.
Thanks again,
Chris C.
*From:* Jeff Johnson [mailto:j...@dcsoftware.com]
*Sent:* Friday, July 02, 2010 2:09 PM
*To:* Chris C.
*Subject:* Re: [Tutor] Help with choices for new database program
On 07/02/2010 11:40 AM, Ch
On 7/2/2010 5:56 PM, Jeff Johnson wrote:
[snip]
Visual FoxPro ... is very similar to Access
I differ. Access and FoxPro are very different. Yes they both use
tables, relationships, indexes and SQL. Yes they both have visual
designers for forms and reports. Yes they both are programmable.
On Fri, Jul 2, 2010 at 10:10 PM, David Hutto wrote:
> On Fri, Jul 2, 2010 at 10:07 PM, David Hutto wrote:
>> On Fri, Jul 2, 2010 at 10:01 PM, David Hutto wrote:
>>> On Fri, Jul 2, 2010 at 9:55 PM, Jeff Johnson wrote:
On 07/02/2010 06:51 PM, David Hutto wrote:
>
> In the end, there
On Fri, Jul 2, 2010 at 10:07 PM, David Hutto wrote:
> On Fri, Jul 2, 2010 at 10:01 PM, David Hutto wrote:
>> On Fri, Jul 2, 2010 at 9:55 PM, Jeff Johnson wrote:
>>> On 07/02/2010 06:51 PM, David Hutto wrote:
In the end, there might be so many packages, I might not be able to
handl
On Fri, Jul 2, 2010 at 10:01 PM, David Hutto wrote:
> On Fri, Jul 2, 2010 at 9:55 PM, Jeff Johnson wrote:
>> On 07/02/2010 06:51 PM, David Hutto wrote:
>>>
>>> In the end, there might be so many packages, I might not be able to
>>> handle it all(for my own uses). But, I would think, you would agr
On Fri, Jul 2, 2010 at 9:55 PM, Jeff Johnson wrote:
> On 07/02/2010 06:51 PM, David Hutto wrote:
>>
>> In the end, there might be so many packages, I might not be able to
>> handle it all(for my own uses). But, I would think, you would agree
>> that a simple account balance app, would be no more t
On 07/02/2010 06:51 PM, David Hutto wrote:
In the end, there might be so many packages, I might not be able to
handle it all(for my own uses). But, I would think, you would agree
that a simple account balance app, would be no more than tkinter with
a few functions to write and retrieve data from
On Fri, Jul 2, 2010 at 9:44 PM, Jeff Johnson wrote:
> On 07/02/2010 06:32 PM, David Hutto wrote:
>>
>> On Fri, Jul 2, 2010 at 9:31 PM, David Hutto wrote:
>>
>>>
>>> Well, it was mainly that he said he was a beginner and was only using
>>> this for a single banking project, I do believe.
>>>
>>> N
On Fri, Jul 2, 2010 at 9:31 PM, David Hutto wrote:
> On Fri, Jul 2, 2010 at 9:27 PM, Jeff Johnson wrote:
>> On 07/02/2010 06:14 PM, David Hutto wrote:
>>>
>>> Stick to the main python libraries(python with sqllite, and for the
>>> standalone exe know it's somewhere, and I've seen it in the past f
On Fri, Jul 2, 2010 at 9:27 PM, Jeff Johnson wrote:
> On 07/02/2010 06:14 PM, David Hutto wrote:
>>
>> Stick to the main python libraries(python with sqllite, and for the
>> standalone exe know it's somewhere, and I've seen it in the past few
>> days, but didn't pay attention because it wasn't imp
On 07/02/2010 06:14 PM, David Hutto wrote:
Stick to the main python libraries(python with sqllite, and for the
standalone exe know it's somewhere, and I've seen it in the past few
days, but didn't pay attention because it wasn't important to what I
was doing at the time) going anywhere else is t
d because I was beginning to lose faith in being able to get help
> from the Dabo mailing list.
>
>
>
> Thanks again,
>
> Chris C.
>
>
>
>
>
> From: Jeff Johnson [mailto:j...@dcsoftware.com]
> Sent: Friday, July 02, 2010 2:09 PM
> To: Chris C.
> Subject:
ginning to lose faith in being able to
get help from the Dabo mailing list.
Thanks again,
Chris C.
*From:* Jeff Johnson [mailto:j...@dcsoftware.com]
*Sent:* Friday, July 02, 2010 2:09 PM
*To:* Chris C.
*Subject:* Re: [Tutor] Help with choices for new database program
On 07/02/2010 11:40 AM, Ch
"Chris C." wrote
rewrite one of my Access dbs (one that does our finances) into a
stand-alone
Python database program using SQLite. I know I'll be learning as I
go, but
that'll work, I'm not in a big hurry and I'll work on it in my spare
time.
If its a database focused app I'd take a look
On 07/02/2010 11:40 AM, Chris C. wrote: I'm writing this question
because I want, for my own satisfaction, to rewrite one of my Access dbs
(one that does our finances) into a stand-alone Python database program
using SQLite. I know I'll be learning as I go, but that'll work, I'm
not in a big h
Hi,
I'm not a programmer, but I have been exposed to some programming basics.
I've written small parts of console-based C++ programs in an OOP class I
took last year (but nothing outside of the classroom setting), and on my own
I've written some semi-simple multi-form multi-report databases in Acc
On 17/06/2010 19:22, Lowell Tackett wrote:
From the virtual desk of Lowell Tackett
--- On Thu, 6/17/10, Mark Lawrence wrote:
From: Mark Lawrence
Subject: Re: [Tutor] help
To: tutor@python.org
Date: Thursday, June 17, 2010, 8:30 AM
On 17/06/2010 08:28, KB SU wrote:
help
Help, I need
>From the virtual desk of Lowell Tackett
--- On Thu, 6/17/10, Mark Lawrence wrote:
From: Mark Lawrence
Subject: Re: [Tutor] help
To: tutor@python.org
Date: Thursday, June 17, 2010, 8:30 AM
On 17/06/2010 08:28, KB SU wrote:
>
On 17/06/2010 08:28, KB SU wrote:
help
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Help, I need somebody,
Help, not just anybody,
Help, you know I need
On Thu, 17 Jun 2010 05:28:37 pm KB SU wrote:
> help
No no, don't tell us what you need help about! I love guessing games!
Let me see now... I'm guessing that your problem is that don't know how
to work out the length of a string. Here's one way:
string = "something"
count = 1
for char in string
Solution: width times height.
On 6/17/10, KB SU wrote:
> help
>
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
help
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
extract all the p values and how do i
> sort the file and how i open the respective file. Thanks for helping
>
>
>> Date: Sat, 15 May 2010 19:58:33 -0400
>> From: da...@ieee.org
>> To: einstein...@hotmail.com
>> CC: tutor@python.org
>> Subject: Re: [Tut
"she haohao" wrote
Question is how can i sort the file so that it looks like this:
Chr17 9 4.5 5.5
chr1 10 6 2.5 4.4
chr10 6 9 3.5 4.5
I have no idea! How would you do it manually?
In what way is this considered s
she haohao wrote:
> Hi,
>
> I have some questions that I am unable to figure out.
>
> Let say I have a file name peaks.txt.
>
> Chr17 9 4.5 5.5
> chr10 6 9 3.5 4.5
> chr1 10 6 2.5 4.4
>
> Question is how can i sort the fi
Hi,
I have some questions that I am unable to figure out.
Let say I have a file name peaks.txt.
Chr17 9 4.5 5.5
chr10 6 9 3.5 4.5
chr1 10 6 2.5 4.4
Question is how can i sort the file so that it looks like this:
On Fri, 14 May 2010 06:08:30 pm she haohao wrote:
> Say I have a .fa file and I want to print a subsequence from the file
> without the \n how can i do it.
>
> Example: Inside the test.fa file I have
>
> >chromosome 1
>
> ACTGTGTTC
> ACGTCGACC
> AVGTT
> ACGTTaGTC
>
> so if I say i wan the subs
On Fri, May 14, 2010 at 9:25 PM, Abhishek Mishra wrote:
>
linear1 = ''.join(foo.split('\n'))
linear2 = foo.replace('\n','')
> ^^ these are the two ways in which you can linearize the input text by
> removing all '\n'
+1 for the replace. More obvious, cleaner, more efficient.
Hugo
Not sure if I understood the problem exactly, but you could linearize the
text by using something like this --
>>> foo = '''ACTGTGTTC
... ACGTCGACC
... AVGTT
... ACGTTaGTC'''
>>> foo
'ACTGTGTTC\nACGTCGACC\nAVGTT\nACGTTaGTC'
>>> linear1 = ''.join(foo.split('\n'))
>>> linear1
'ACTGTGTTCACGT
Hi,
I am a beginner in python and I have a problem here and I hope someone can help
me.
Your help is greatly appreciated.
Question.
Say I have a .fa file and I want to print a subsequence from the file without
the \n how can i do it.
Example: Inside the test.fa file I have
>c
"Dave Angel" wrote
But you have a serious bug in your code, that nobody in the first five
responses has addressed. That while loop will loop over the first line
repeatedly, till it reaches or exceeds 1000, regardless of the length of
subsequent lines.
Oooh, good catch, I completely miss
ramya natarajan wrote:
Hello,
I am very beginner to programming, I got task to Write a loop that
reads
each line of a file and counts the number of lines that are read until
the
total length of the lines is 1,000 characters. I have to read lines from
files exactly upto 1000 characters.
Her
"spir ☣" wrote
Either you read line per line, but then you cannot stop exactly at the 1000th
character;
or you traverse the text char per char, but this is a bit picky.
Or you could just read 1000 chars from the file then pick out the lines from
that.
But that requires you to count newlin
"ramya natarajan" wrote
characters.But the problem is its reading entire line and not stopping
excatly in 1000 characters.
Do you really need to stop reading the file at 1000 characters rather
than the line containing the 1000th character? That seems a very
arbitrary sort of thing to do.
On 12-May-2010, at 12:32 AM, spir ☣ wrote:
> On Tue, 11 May 2010 11:00:20 -0700
> ramya natarajan wrote:
>
>> Hello,
>>
>> I am very beginner to programming, I got task to Write a loop that reads
>> each line of a file and counts the number of lines that are read until the
>> total length of
On Tue, 11 May 2010 11:00:20 -0700
ramya natarajan wrote:
> Hello,
>
> I am very beginner to programming, I got task to Write a loop that reads
> each line of a file and counts the number of lines that are read until the
> total length of the lines is 1,000 characters. I have to read lines fro
On Tue, May 11, 2010 at 1:00 PM, ramya natarajan wrote:
> Hello, I have to read lines from
> files exactly upto 1000 characters.
>But the problem is its reading entire line and not stopping
> excatly in 1000 characters. Can some one help what mistake i am doing here?.
>
> log = open('/tmp/new.t
Hello,
I am very beginner to programming, I got task to Write a loop that reads
each line of a file and counts the number of lines that are read until the
total length of the lines is 1,000 characters. I have to read lines from
files exactly upto 1000 characters.
Here is my code:
I created fil
On Sun, Apr 4, 2010 at 3:15 PM, Brian Drwecki wrote:
>
> As for the exact error codehere it is.
>
> while True:
> reply = raw_input('Enter text:')
> if reply == 'stop':
> break
> elif not reply.isdigit( ):
> print 'Bad!' * 8
> else:
> print int(rep
Python version
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)]
on win32
Type "copyright", "credits" or "license()" for more information
As for the exact error codehere it is.
>>>
while True:
reply = raw_input('Enter text:')
if reply == 'stop':
b
similarly, you get an error if:
"print int(reply) ** 2
print 'Bye'"
... is all a single line and/or if you mixed spaces and TABs.
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
"Python Fundamentals", Prentice Hall,
On Sun, 4 Apr 2010 03:40:57 pm Brian Drwecki wrote:
> Hi all... I am working from the Learning Python 3rd edition published
> by O'Reily... FYI I am trying to learn Python on my own (not for
> course credit or anything).. I am a psychologist with very limited
> programming experience.. I am anal, a
Hi all... I am working from the Learning Python 3rd edition published by
O'Reily... FYI I am trying to learn Python on my own (not for course credit
or anything).. I am a psychologist with very limited programming
experience.. I am anal, and this example code doesn't work.. I am using IDLE
to do ev
i understood.. its working fine now. thank u all.. ^_^
On Wed, Mar 31, 2010 at 8:20 PM, bob gailer wrote:
> Thank you for specifics.
>
> Please always reply-all so a copy goes to the list.
>
>
> On 3/30/2010 3:41 PM, Oshan Modi wrote:
>
>>
>> I have windows 7 (ultimate), python 2.6.3...
>> when
Thank you for specifics.
Please always reply-all so a copy goes to the list.
On 3/30/2010 3:41 PM, Oshan Modi wrote:
I have windows 7 (ultimate), python 2.6.3...
when i try to run the file echoinput.py
Please post a copy of this file.
it doesnt respond to the request
Actually you should
You didn't say what operating system, but in general terms, the python
application has to know how to find your python module, say 'foo.py'. This
means
that the directory where foo.py is located must be on the system path or
PYTHONPATH.
One simple way to do this is to navigate at the command p
On 3/28/2010 10:00 PM, Oshan Modi wrote:
i am only a novice and just started programming.. i am having trouble
running a .py file in the command prompt.. if anyone of you could help?
Please learn how to ask questions.
In a situation like this we'd like to know what operating system you are
us
Simple; just write
python program.py
in your command line :)
On Tue, Mar 30, 2010 at 2:08 PM, Christian Witts wrote:
> Oshan Modi wrote:
>
>> I have Windows 7 and am using python 2.6.. I added python.exe's address in
>> the path option under enviromental variables.. i can run python in command
>>
Oshan Modi wrote:
I have Windows 7 and am using python 2.6.. I added python.exe's
address in the path option under enviromental variables.. i can run
python in command prompt.. its just that i dont know to make it
execute a file directly rather than typing the whole program again and
again..
Forwarding to the list.
Martijn wrote:
On Tue, Mar 30, 2010 at 12:15 PM, Christian Witts
mailto:cwi...@compuscan.co.za>> wrote:
Oshan Modi wrote:
i am only a novice and just started programming.. i am having
trouble running a .py file in the command prompt.. if
On Mon, 29 Mar 2010 01:00:45 pm Oshan Modi wrote:
> i am only a novice and just started programming.. i am having trouble
> running a .py file in the command prompt.. if anyone of you could
> help?
Are you running Linux or Mac? At the command prompt, run:
python myfile.py
and report any erro
Oshan Modi wrote:
i am only a novice and just started programming.. i am having trouble
running a .py file in the command prompt.. if anyone of you could help?
___
Tutor maillist
On Mon, Mar 29, 2010 at 7:30 AM, Oshan Modi wrote:
> i am only a novice and just started programming.. i am having trouble
> running a .py file in the command prompt.. if anyone of you could help?
>
How are you trying to run it ??
--
Vishwajeet Singh
+91-9657702154 | dextrou...@gmail.com | h
i am only a novice and just started programming.. i am having trouble
running a .py file in the command prompt.. if anyone of you could help?
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mai
So, am I right that for each X value in file 2, you want to look up to see
if you can find a corresponding line in file 1 where the value from file 2
falls between the X and Y value from file 1, and if found, then output the
original line from file 2 and the 6th column from the found line from file
On 3/25/2010 11:34 AM, kumar s wrote:
Dear group:
I need some tips/help from experts.
I have two files tab-delimted.
One file is 4K lines. The other files is 40K lines.
I want to search contents of a file to other and print those lines that satisfy.
File 1:
chr X Y
chr1
Dear group:
I need some tips/help from experts.
I have two files tab-delimted.
One file is 4K lines. The other files is 40K lines.
I want to search contents of a file to other and print those lines that satisfy.
File 1:
chr X Y
chr18337733 8337767 NM_001042682_cds_0_0_
Please don't hijack an old message to create a new subject.
Those of us using threaded readers might not see it and you
lose potential answers.
"Robert DeLaurentis" wrote
The local function change_volume(v) requires the argument v to operate
properly,
but I'm unclear where the value of that a
I've just begun learning Python and programming using the Head First
Programming from O'Reilly. The following code works on my Mac just fine, but
there is a mystery as to how its working that escapes me so far.
The local function change_volume(v) requires the argument v to operate
properly, but
Kent Johnson wrote:
On Thu, Feb 4, 2010 at 12:47 PM, Alan Harris-Reid
wrote:
Hi,
I have a SQLite cursor which I want to traverse more than once, eg...
for row in MyCursor:
method1(row)
then later...
for row in MyCursor:
method2(row)
Method2 is never run, I guess because the pointer is
On Thu, Feb 4, 2010 at 12:47 PM, Alan Harris-Reid
wrote:
> Hi,
>
> I have a SQLite cursor which I want to traverse more than once, eg...
> for row in MyCursor:
> method1(row)
> then later...
> for row in MyCursor:
> method2(row)
> Method2 is never run, I guess because the pointer is at the b
Hi,
I have a SQLite cursor which I want to traverse more than once, eg...
for row in MyCursor:
method1(row)
then later...
for row in MyCursor:
method2(row)
Method2 is never run, I guess because the pointer is at the bottom of
the row 'stack' after the first 'for' loop
How can I mo
On Wednesday February 3 2010 12:26:43 David wrote:
> thanks for the explanation, all this is really helpful -- I certainly
> have learned sth. today!
> I wonder, though, how I would get my number pairs, which I need later
> on, if I were to follow your solution. I am asking because as I
> understan
On Wed, Feb 3, 2010 at 8:19 AM, NISA BALAKRISHNAN
wrote:
> hi
>
> I am very new to python.
> I have a string for example : 123B new Project
> i want to separate 123B as a single string and new project as another
> string .
> how can i do that.
> i tried using partition but couldnt do it
str.
On 03/02/10 13:19, NISA BALAKRISHNAN wrote:
hi
I am very new to python.
I have a string for example : 123B new Project
i want to separate 123B as a single string and new project as another
string .
how can i do that.
i tried using partition but couldnt do it
pls help.
thanks in advance!
On Wed, Feb 3, 2010 at 7:19 AM, NISA BALAKRISHNAN <
snisa.balakrish...@gmail.com> wrote:
> hi
>
> I am very new to python.
> I have a string for example : 123B new Project
> i want to separate 123B as a single string and new project as another
> string .
> how can i do that.
> i tried using p
hi
I am very new to python.
I have a string for example : 123B new Project
i want to separate 123B as a single string and new project as another
string .
how can i do that.
i tried using partition but couldnt do it
pls help.
thanks in advance!
___
On Wed, Feb 3, 2010 at 5:26 AM, David wrote:
> Hello Eike,
>
> thanks for the explanation, all this is really helpful -- I certainly have
> learned sth. today!
> I wonder, though, how I would get my number pairs, which I need later on,
> if I were to follow your solution. I am asking because as I
On Wed, Feb 3, 2010 at 12:12 AM, David wrote:
> def createQuestions:
>generate all multiplication combinations possible
>append as tuple to pool
>eliminate 'mirrored doubles' (i.e. 7x12 and 12x7)
>randomize pool
>
>
I haven't really looked through most of this stuff - but your mir
Hello Eike,
thanks for the explanation, all this is really helpful -- I certainly
have learned sth. today!
I wonder, though, how I would get my number pairs, which I need later
on, if I were to follow your solution. I am asking because as I
understand your code, the list terms is a list of int
Hello David!
On Wednesday February 3 2010 04:21:56 David wrote:
>
> import random
> terms = []
> for i in range(2):
> terms = random.randint(1, 99)
> print terms
Here is an other solution, which is quite easy to understand and short:
import random
terms = []
for i in range(2):
terms
On Wed, 03 Feb 2010 14:12:42 +0800
David wrote:
> Hello Benno, list,
>
> thanks for those clarifications, which, well, clarify things ;-)
>
> This is my latest creation:
>
> import random
>
> def createTerms():
> terms = []
> for i in range(2):
> terms.append(random.randin
On Wed, 03 Feb 2010 11:21:56 +0800
David wrote:
> Hello list,
>
> I thought this was easy even for me, but I was wrong, I guess.
> Here is what I want to do: take two random numbers between 1 and 99, and
> put them into a list.
>
> import random
> terms = []
> for i in range(2):
> terms
On Wed, Feb 3, 2010 at 10:06 AM, David wrote:
> Bob,
>
> brilliant stuff -- I am truly awed by this. Create a default-filled matrix
> and mark combinations used so as to take them out of the game? Wow. This is
> new to me.
>
> On 03/02/10 15:46, bob gailer wrote
>
>> def askQuestions(): # generate
On Wed, Feb 3, 2010 at 8:19 AM, David wrote:
> Hello Bob,
>
> thanks for your comments!
>
>
> On 03/02/10 14:51, bob gailer wrote:
>
>> or if you seek terseness:
>>
>> terms = [random.randint(1, 99) for i in 'ab']
>
> Do I understand correctly that 'ab' here merely serves to produce a 'dummy
> seq
Bob,
brilliant stuff -- I am truly awed by this. Create a default-filled
matrix and mark combinations used so as to take them out of the game?
Wow. This is new to me.
On 03/02/10 15:46, bob gailer wrote
def askQuestions(): # generate and ask questions:
for i in range(NQ):
while 1: # loop ti
David wrote:
[snip]
My suggestion (untested):
MAX = 12
NQ = 20 # of questions to ask
# create a 2 dimensional array of 1's
row = [1]*MAX
pool = [row[:] for i in range(MAX)]
incorrect = [] # store incorrectly answered combos here
def askQuestions(): # generate and ask questions:
for i in r
Hello Bob,
thanks for your comments!
On 03/02/10 14:51, bob gailer wrote:
or if you seek terseness:
terms = [random.randint(1, 99) for i in 'ab']
Do I understand correctly that 'ab' here merely serves to produce a
'dummy sequence' over which I can run the for loop?
David
__
David wrote:
Hello list,
I thought this was easy even for me, but I was wrong, I guess.
Here is what I want to do: take two random numbers between 1 and 99,
and put them into a list.
[snip]
Or you can use list comprehension:
terms = [random.randint(1, 99) for i in range(2)]
or if you seek
Hello Benno, list,
thanks for those clarifications, which, well, clarify things ;-)
This is my latest creation:
import random
def createTerms():
terms = []
for i in range(2):
terms.append(random.randint(1, 99))
j = terms[0]
k = terms[1]
print "%3d\nx%2d" % (j, k)
On Wed, Feb 3, 2010 at 12:21 PM, David wrote:
> Hello list,
>
> I thought this was easy even for me, but I was wrong, I guess.
> Here is what I want to do: take two random numbers between 1 and 99, and put
> them into a list.
>
> import random
> terms = []
> for i in range(2):
> terms = ra
Hello list,
I thought this was easy even for me, but I was wrong, I guess.
Here is what I want to do: take two random numbers between 1 and 99, and
put them into a list.
import random
terms = []
for i in range(2):
terms = random.randint(1, 99)
print terms
This prints just one number
Hello!
I posted this question on the f2py list but since I haven't got any answers
(yet), I thought I'd try my luck here.
I'm having a hard time wrapping a fortran subroutine into a python module. The
problem seems to be related to having a subroutine argument to the fortran
subroutine.
A simpl
Many thanks to Alan Gauld, Gerard Flanagan, Lie Ryan and spir for your replies.
All systems are go!
Cheers,
Garry
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Garry Bettle dixit:
> for fixture in FixtureList:
> print fixture.ljust(6), FixtureList[fixture]
...
> for fixture, racetimes in FixtureList:
> print fixture, racetimes
>
> Traceback (most recent call last):
> File "", line 1, in
> for fixture, racetimes in FixtureList:
> ValueErro
Garry Bettle dixit:
[...series of data with same format...]
> 2010-01-07 1437 Crayfd H3 380m
> ... etc.
>
> The above are RaceDate + RaceTime + Fixture + RaceDetails, and are
> output in RaceTime order.
>
> What I'd like to do, is output a transposed-like summary of just the
> Fixture + RaceTime
On 1/8/2010 3:12 AM, Garry Bettle wrote:
This is what I've come up with. Sorry, python is something I touch on
occasionally: must do more!
As the races are output, I build a dictionary of key=FixtureName and
value=RaceTimes:
RaceTime = marketResp.market.displayTime.time()
cRaceTime = RaceTime
Garry Bettle wrote:
Howdy all,
I hope this message finds you all well.
I have a list that I output in the following order:
2010-01-07 1103 Sund A7 450m
2010-01-07 Sheff A7 500m
2010-01-07 1119 Sund A6 450m
2010-01-07 1128 Sheff A6 500m
2010-01-07 1134 Sund A5 450m
2010-01-07 1142 Sheff A7
"Garry Bettle" wrote
What I'd like to do, is output a transposed-like summary of just the
Fixture + RaceTime.
Sund 1103 1119 1134 1148 1204 1218 1232 1247 1304 1319 1333 1351
Sheff 1128 1142 1157 1212 1227 1242 1258 1312 1327 1344 1403
As the races are output, I build a dictionary of k
On Thu, Jan 7, 2010 at 15:26, Garry Bettle wrote:
>
> Howdy all,
>
> I hope this message finds you all well.
>
> I have a list that I output in the following order:
>
> 2010-01-07 1103 Sund A7 450m
> 2010-01-07 Sheff A7 500m
> 2010-01-07 1119 Sund A6 450m
> 2010-01-07 1128 Sheff A6 500m
> 201
On Thu, Jan 7, 2010 at 10:51 PM, Garry Bettle wrote:
> I have a list that I output in the following order:
>
> 2010-01-07 1103 Sund A7 450m
> 2010-01-07 Sheff A7 500m
> 2010-01-07 1119 Sund A6 450m
> 2010-01-07 1128 Sheff A6 500m
> 2010-01-07 1134 Sund A5 450m
> 2010-01-07 1142 Sheff A7 500m
Howdy all,
I hope this message finds you all well.
I have a list that I output in the following order:
2010-01-07 1103 Sund A7 450m
2010-01-07 Sheff A7 500m
2010-01-07 1119 Sund A6 450m
2010-01-07 1128 Sheff A6 500m
2010-01-07 1134 Sund A5 450m
2010-01-07 1142 Sheff A7 500m
2010-01-07 1148
Ray Holt wrote:
find the 1000th. prime number.
Break this down into 2 separate problems. (I assume 1 is the first prime
number)
1 - determining the next prime number
2 - repeating that 1000 times.
A while loop is a way to accomplish 2.
How do you determine the next prime number? There are man
On Mon, Nov 16, 2009 at 10:56 AM, Ray Holt wrote:
> I have posted this on other lists, but have just discovered this one. Can
> someone give me help on writing the code necessary to find the 1000th. prime
> number. I know I will have to use a while loop, but I can't seem to get the
> body of the c
mrhol...@sbcglobal.net wrote on 11/16/2009 10:56:07 AM:
> I have posted this on other lists, but have just discovered this one.
Welcome to the list. I am sure you will find plenty of folks here
who will be happy to help you.
> Can someone give me help on writing the code
> necessary
1201 - 1300 of 2055 matches
Mail list logo