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 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 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