[email protected] (Stefan Ram) writes: > Hope Rouselle <[email protected]> writes: >>How would you write this? > > """Rolls two dice until both yield the same value. > Returns the number of times the two dice were rolled > and the final value yielded.""" > roll_count = 0 > while True: > outcome = roll_two_dice() > roll_count += 1 > if outcome[ 0 ]== outcome[ 1 ]: break > return roll_count, outcome[ 0 ]
You totally convinced me. Thanks. -- https://mail.python.org/mailman/listinfo/python-list
