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
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: + seconds
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: + seconds
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
:
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
secondsRemain =
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, tutor-requ...@python.org wrote:
Send Tutor mailing list submissions to
tutor@python.org
To subscribe or unsubscribe via the World Wide
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
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
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
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 -
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
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
On Fri, Feb 17, 2012 at 1:41 PM, Rohan Sachdeva rsach...@usc.edu 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
On 17/02/2012 02:53, Elaina Ann Hyde wrote:
On Fri, Feb 17, 2012 at 1:41 PM, Rohan Sachdevarsach...@usc.edu 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 -
--
Message: 1
Date: Wed, 15 Feb 2012 23:57:08 -0500
From: Luke Thomas Mergner lmerg...@gmail.com
To: tutor@python.org
Subject: [Tutor] Debugging While Loops for Control
Message-ID:
On Fri, Feb 17, 2012 at 2:27 PM, Mark Lawrence breamore...@yahoo.co.ukwrote:
On 17/02/2012 02:53, Elaina Ann Hyde wrote:
On Fri, Feb 17, 2012 at 1:41 PM, Rohan Sachdevarsach...@usc.edu wrote:
The way I would do this is to put all of the differences in a list then
take the maximum of the
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 an
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 behave
18 matches
Mail list logo