On 28/01/2015 01:28, Alan Gauld wrote:
On 28/01/15 00:09, Mark Lawrence wrote:
To get round that you need to explicitly compare o_die1
to both values:
if (o_die1 > d_die1) or (o_die1 > d_die2):
I consider the chained comparisons shown here
https://docs.python.org/3/reference/expressio
On 28/01/15 00:09, Mark Lawrence wrote:
To get round that you need to explicitly compare o_die1
to both values:
if (o_die1 > d_die1) or (o_die1 > d_die2):
I consider the chained comparisons shown here
https://docs.python.org/3/reference/expressions.html#not-in to be far
more Pythonic.
On 2015-01-27 16:10, Steven D'Aprano wrote:
On Tue, Jan 27, 2015 at 08:39:17AM -0800, Alex Kleider wrote:
I use the docopt module to collect command line options and then
configparser to read a file.
Some of the values (such as a port number, for example) must then be
adjusted. An example is
a
On Tue, Jan 27, 2015 at 08:39:17AM -0800, Alex Kleider wrote:
> I use the docopt module to collect command line options and then
> configparser to read a file.
> Some of the values (such as a port number, for example) must then be
> adjusted. An example is
> a port number which I want to conver
On 27/01/2015 23:09, Alan Gauld wrote:
On 27/01/15 19:12, Dillon Cortez wrote:
problem is that if any of the offensive dice is bigger
> than only one of the defensive dice,
the program shows the offense as the winner,
def winner():
if o_die1 > d_die1 or d_die2:
print "The off
On Tue, Jan 27, 2015 at 2:07 PM, joseph dorsten wrote:
> When I run the program I get: NameError: name 'die1' is not
> defined However I defined die1 in the program as die1 =
> random,randint (1, 6) Thanks for any help, joe
Hi Joe,
Unfortunately, this is insufficient information.
On 27/01/15 22:47, jarod...@libero.it wrote:
I create a list of local object: but I can't execute as object only as string:
ena = Rnaseq(options.configura, options.rst)
job_1 = ena.trimmomatic()
job_2 = ena.star()
job_3 = ena.wiggle()
job_4 = ena.rnaseqc()
On 27/01/15 22:07, joseph dorsten wrote:
When I run the program I get: NameError: name 'die1' is not
defined However I defined die1 in the program as die1 =
random,randint (1, 6) Thanks for any help, joe
Which program?
Your subject says chapter 3, but of which book?
There are doz
On Tue, Jan 27, 2015 at 2:47 PM, jarod...@libero.it wrote:
> I create a list of local object: but I can't execute as object only as
> string:
> ena = Rnaseq(options.configura, options.rst)
> job_1 = ena.trimmomatic()
> job_2 = ena.star()
> job_3 = ena.wiggle()
>
On 27/01/15 19:12, Dillon Cortez wrote:
problem is that if any of the offensive dice is bigger
> than only one of the defensive dice,
the program shows the offense as the winner,
def winner():
if o_die1 > d_die1 or d_die2:
print "The offense has won"
The problem is that the c
I create a list of local object: but I can't execute as object only as string:
ena = Rnaseq(options.configura, options.rst)
job_1 = ena.trimmomatic()
job_2 = ena.star()
job_3 = ena.wiggle()
job_4 = ena.rnaseqc()
job_5 = ena.picard_sort_sam()
On 01/27/2015 08:04 AM, Tammy Miller wrote:
> I have a csv file. I would like to create a filter or if statement on a
> column but it is not producing the right results. It displays everythingHere
> is the example:import csvwith open('test.csv') as csvfile:reader =
> csv.DictReader(csvfile)f
When I run the program I get: NameError: name 'die1' is not
defined However I defined die1 in the program as die1 =
random,randint (1, 6) Thanks for any help, joe
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription
I’m trying to write a program for the dice in a game of risk. It runs but the
problem is that if any of the offensive dice is bigger than only one of the
defensive dice, the program shows the offense as the winner, even when the
defense should win. Can you help me out with this?
here’s the code
On 2015-01-27 00:15, Alan Gauld wrote:
On 27/01/15 02:04, Alex Kleider wrote:
Please correct me if I am wrong, but I've assumed that it is proper to
define all functions before embarking on the main body of a program.
No, you can do it either way round. Top-Down or Bottom-Up as they are
known
On 2015-01-26 22:30, Ben Finney wrote:
Alex Kleider writes:
Please correct me if I am wrong, but I've assumed that it is proper to
define all functions before embarking on the main body of a program.
I would say rather that as much code as possible should be in small
well-defined functions,
On 27/01/2015 18:20, Danny Yoo wrote:
On Tue, Jan 27, 2015 at 5:04 AM, Tammy Miller wrote:
I have a csv file. I would like to create a filter or if statement on a column but
it is not producing the right results. It displays everythingHere is the
example:import csvwith open('test.csv') as csv
>
> In your code, you are comparing a string (an element of your CSV row)
> with a number.
Whoops, forgot to include recommendations. You probably do not want to
have comparisons of mixed type. As we have found, the result we get
back is arbitrary and capricous. Rather, we probably want to comp
On Tue, Jan 27, 2015 at 5:04 AM, Tammy Miller wrote:
> I have a csv file. I would like to create a filter or if statement on a
> column but it is not producing the right results. It displays everythingHere
> is the example:import csvwith open('test.csv') as csvfile:reader =
> csv.DictReader
On 27/01/15 13:04, Tammy Miller wrote:
I have a csv file. I would like to create a filter or if statement on a column but
it is not producing the right results. It displays everythingHere is the
example:import csvwith open('test.csv') as csvfile:reader =
csv.DictReader(csvfile)for row in r
On 27/01/15 16:50, Reuben wrote:
I wish to know which python module works well with Linux commands
Most Python modules work on Linux if you are running your Python program
on a Linux machine.
e.g. Searching a string in file, number of occurrences of a string in a
file,
Thee isn't a speci
I have a csv file. I would like to create a filter or if statement on a column
but it is not producing the right results. It displays everythingHere is the
example:import csvwith open('test.csv') as csvfile:reader =
csv.DictReader(csvfile)for row in reader:if row['Absent'] > 10 prin
You're actually asking multiple subquestions here, let me start by
asking a clarifying question:
When you say "log in to the Linux machine" I assume you mean you need
to access a remote host? Your script will be running locally?
Next your other questions:
Checking permissions of a file: Look int
Hello,
I wish to know which python module works well with Linux commands - for
e.g. Searching a string in file, number of occurrences of a string in a
file, what is the permission of a file.
To test this operation I need my python script to login into the Linux
machine and then perform the above
On 2015-01-27 03:18, Steven D'Aprano wrote:
On Mon, Jan 26, 2015 at 06:04:10PM -0800, Alex Kleider wrote:
Please correct me if I am wrong, but I've assumed that it is proper to
define all functions before embarking on the main body of a program.
I find myself breaking this rule because I want to
On Mon, Jan 26, 2015 at 06:04:10PM -0800, Alex Kleider wrote:
> Please correct me if I am wrong, but I've assumed that it is proper to
> define all functions before embarking on the main body of a program.
> I find myself breaking this rule because I want to set the default
> values of some named
On 27/01/15 02:04, Alex Kleider wrote:
Please correct me if I am wrong, but I've assumed that it is proper to
define all functions before embarking on the main body of a program.
No, you can do it either way round. Top-Down or Bottom-Up as they are known.
Usually its a muxture of both.
But mo
27 matches
Mail list logo