#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    2
    Rep Power
    0

    Need help with while loop with multiple conditions


    Code:
    _____
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,995
    Rep Power
    481
    Code:
            while (max(point_counter_A, point_counter_B) < 11) or (abs(point_counter_A - point_counter_B) < 2):
    I fixed the stopping condition and noted
    Code:
    print playgame(999, 60, 50)  # playgame returns None.  Printing None won't be interesting the second or third time.
    [code]Code tags[/code] are essential for python code and Makefiles!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    2
    Rep Power
    0
    Originally Posted by b49P23TIvg
    Code:
            while (max(point_counter_A, point_counter_B) < 11) or (abs(point_counter_A - point_counter_B) < 2):
    I fixed the stopping condition and noted
    Code:
    print playgame(999, 60, 50)  # playgame returns None.  Printing None won't be interesting the second or third time.
    Thank you very much! It works now.

IMN logo majestic logo threadwatch logo seochat tools logo