On 17/02/12 01:29, Daryl V wrote:
def Int2Digit(integer):
if integer < 9:
strInteger = "0"+str(integer)
else:
strInteger = str(integer)
return strInteger
Or using format strings:
def int2Digit(integer):
return "%02d" % integer
Although this doesn't beha
Hi Elaina,
> Vhel_fdiff3=[]
> for i in xrange(len(Vmatch3_1)):
> Vhel_fdiff3.append(max([abs(Vmatch3_1[i] - Vmatch3_2[i]),abs(Vmatch3_1[i]
> - Vmatch3_3[i]),abs(Vmatch3_3[i] - Vmatch3_2[i])]))
>
> #print Vhel_fdiff3
> #appending writes a list, but numpy which makes the with_ work needs a
On Fri, Feb 17, 2012 at 2:27 PM, Mark Lawrence wrote:
> On 17/02/2012 02:53, Elaina Ann Hyde wrote:
>
>> On Fri, Feb 17, 2012 at 1:41 PM, Rohan Sachdeva wrote:
>>
>> The way I would do this is to put all of the differences in a list then
>>> take the maximum of the list. So..
>>>
>>> a = Vmatch3
>
> --
>
> Message: 1
> Date: Wed, 15 Feb 2012 23:57:08 -0500
> From: Luke Thomas Mergner
> To: tutor@python.org
> Subject: [Tutor] Debugging While Loops for Control
> Message-ID:
> Content-Type: text/plain; charset=us-ascii
>
On 17/02/2012 02:53, Elaina Ann Hyde wrote:
On Fri, Feb 17, 2012 at 1:41 PM, Rohan Sachdeva wrote:
The way I would do this is to put all of the differences in a list then
take the maximum of the list. So..
a = Vmatch3_1 - Vmatch3_2
b = Vmatch3_1 - Vmatch3_3
c = Vmatch3_3 - Vmatch3_2
Vhel_fdi
On Fri, Feb 17, 2012 at 1:41 PM, Rohan Sachdeva wrote:
> The way I would do this is to put all of the differences in a list then
> take the maximum of the list. So..
>
> a = Vmatch3_1 - Vmatch3_2
> b = Vmatch3_1 - Vmatch3_3
> c = Vmatch3_3 - Vmatch3_2
>
> Vhel_fdiff3=max([a,b,c])
>
> That should
On 17/02/2012 01:04, Elaina Ann Hyde wrote:
Hello all,
I am still scripting away and have reached my next quandry, this one is
much simpler than the last, basically I read in a file with several
columns.
Vmatch3_1=dat[col1]
Vmatch3_2=dat[col2]
Vmatch3_3=dat[col3]
Vdav=5.0
Vhel_fdiff3=max(abs(
You've gotten some really excellent advice about how to approach working
with the time format. Here's a chunk of code I use quite a bit. It's
probably sub-optimal, but playing with it might help you come up with a
solution that works for your application.
def Int2Digit(integer):
if integer
Hello all,
I am still scripting away and have reached my next quandry, this one is
much simpler than the last, basically I read in a file with several
columns.
Vmatch3_1=dat[col1]
Vmatch3_2=dat[col2]
Vmatch3_3=dat[col3]
Vdav=5.0
Vhel_fdiff3=max(abs(Vmatch3_1 - Vmatch3_2),abs(Vmatch3_1 -
Vmatch3_
Nicholas Palmer wrote:
I am fairly experienced in java and I was wondering how to use java in
python code, if you could give me any tips.\
My first tip is to learn how to use email effectively. Doing so will increase
the chances that volunteers on mailing lists will answer your questions with
On 16/02/12 23:45, Nicholas Palmer wrote:
I am fairly experienced in java and I was wondering how to use java in
python code, if you could give me any tips.\
In general you don't you use Python instead of Java.
But if you really must you can use Jython which is an implementation of
python in
>I am fairly experienced in java and I was wondering how to use java in python
>code, if you could give me any tips.\
Hi,
Please remove any irrelevant sections of the digest if you are replying to it
(which in this case is everything) and change the subject to be more
descriptive. Also, top pos
I am fairly experienced in java and I was wondering how to use java in
python code, if you could give me any tips.\
On Thu, Feb 16, 2012 at 6:00 AM, wrote:
> Send Tutor mailing list submissions to
>tutor@python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>ht
On 02/16/2012 04:46 PM, alain Delon wrote:
userName = raw_input("Enter your name ")
print "hi " + userName + ". \n "
seconds = input("Enter the number of seconds since midnight:")
hours = seconds/3600
hoursRemain = hours%60
minutes = hoursReamain/60
secondsRema
Welcome to the joys of time and date handling.
: userName = raw_input("Enter your name ")
: print "hi " + userName + ". \n "
: seconds = input("Enter the number of seconds since midnight:")
: hours = seconds/3600
: hoursRemain = hours%60
: minutes = hoursReamain/60
:
>userName = raw_input("Enter your name ")
> print "hi " + userName + ". \n "
> seconds = input("Enter the number of seconds since midnight:")
> hours = seconds/3600
> hoursRemain = hours%60
> minutes = hoursReamain/60
> secondsRemain = minutes%60
> print "hours: " + "min
userName = raw_input("Enter your name ")
print "hi " + userName + ". \n "
seconds = input("Enter the number of seconds since midnight:")
hours = seconds/3600
hoursRemain = hours%60
minutes = hoursReamain/60
secondsRemain = minutes%60
print "hours: " + "minutes: "
On 16/02/12 04:57, Luke Thomas Mergner wrote:
My problem is that I am using two functions that return True or False
> to determine whether the player receives another card.
Because of the way it evaluates the while condition, it either
> prints too little information or previously called the
18 matches
Mail list logo