Мне нужно, чтобы второй пользователь не мог видеть ввод первого пользователя, но когда он сообщает второму пользователю о вводе, ввод первого пользователя находится прямо перед ними
score=[0,0]
print("Welcome to Rock Paper Scissors! The score starts as",score)
while True:
player1=input("Player 1's turn: ")
player2=input("Player 2's turn: ")
if (player1.lower() in ["rock","r","rick","rok","roc","rck"]):
if (player2.lower() in ["scissors","s","scissor"]):
score[0]=score[0]+1
print("Player 1 wins! The score is now",score)
if (player2.lower() in ["rock","r","rick","rok","roc","rck"]):
print("It's a tie! The score remains",score)
if (player2.lower() in ["paper","p","pap","piper"]):
score[1]=score[1]+1
print("Player 2 wins! The score is now",score)
if (player1.lower() in ["scissors","s","scissor"]):
if (player2.lower() in ["scissors","s","scissor"]):
score[0]=score[0]+0
print("It's a tie! The score remains",score)
if (player2.lower() in ["rock","r","rick","rok","roc","rck"]):
score[1]=score[1]+1
print("Player 2 wins! The score is now",score)
if (player2.lower() in ["paper","p","pap","piper"]):
score[0]=score[0]+1
print("Player 1 wins! The score is now",score)
if (player1.lower() in ["paper","p","pap","piper"]):
if (player2.lower() in ["scissors","s","scissor"]):
score[1]=score[1]+1
print("Player 2 wins! The score is now",score)
if (player2.lower() in ["rock","r","rick","rok","roc","rck"]):
score[0]=score[0]+1
print("Player 1 wins! The score is now",score)
if (player2.lower() in ["paper","p","pap","piper"]):
score[0]=score[0]+0
print("It's a tie! The score remains",score)
print("N E X T G A M E")
Результат:
Player 1's turn: r
Player 2's turn:
теперь игрок 2 просто использует бумагу и выигрывает игру, поэтому мне нужно как-то скрыть то, что ввел игрок 1 (я использую Python 3.6.1)
Player 1's turn :········ Player 2's turn :random
Это результат, который вы получаете, когда используете его. Опишите подробнее свою проблему. 10.10.2017