Well, I'm not sure what your asking for the first question, but for the second one, you would have an unhandled exception in your code if roll[0] was less than or equal to 0. Hope that helps a bit!
On Fri, Aug 26, 2011 at 8:55 AM, TheIrda <thei...@gmail.com> wrote: > Hello, > > I'm quite new on python, so don't hit too hard if I'm wrong ;) > > > A question on the logic... Does this means > > if roll[0] > 15: > if roll[1] >= 2: > print("Success") > elif roll[2] >= 2: > print("Critical failure!") > > > that rolling multiple 1's get the priority on rolling multiple 6's? I mean > result > 15 and 2 1's is always a critical success even if multiple 6 are > rolled? > > also > > if roll[0] > 15: > ......... > elif roll[0] <=15: <--- this is redundant. already checked for > 15 so if > here is always <= 15 > if roll[1] >= 2: > > you can change with: > > elif roll[1] >= 2: > > > > And... which is the RPG name ? :p > Cheers > > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > >
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor