Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Won't let me end a loop
#8
I explained that in the second part of my post, which part did you not understand? It would be something like this:

playerName = 'one'
playerSymbol = 'two'
while True:
    move = input('Player {} make a move:'.format(playerName))
    print('Player one moved with an {}.'.format(playerSymbol))
    if playerName == 'one':
        playerName = 'two'
        playerSymbol = 'O'
    else:
        playerName = 'one'
        playerSymbol = 'X'
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
Won't let me end a loop - by mzmingle - Aug-06-2017, 07:07 PM
RE: Won't let me end a loop - by ichabod801 - Aug-06-2017, 07:55 PM
RE: Won't let me end a loop - by mzmingle - Aug-06-2017, 08:03 PM
RE: Won't let me end a loop - by ichabod801 - Aug-06-2017, 08:05 PM
RE: Won't let me end a loop - by mzmingle - Aug-06-2017, 08:28 PM
RE: Won't let me end a loop - by ichabod801 - Aug-06-2017, 08:48 PM
RE: Won't let me end a loop - by mzmingle - Aug-06-2017, 08:56 PM
RE: Won't let me end a loop - by ichabod801 - Aug-06-2017, 09:58 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020