ここは私の岩、紙、はさみのゲームですが、私は再びプレイ機能を追加したいと思いますが、どこにどのようにしたらいいのか分かりません。手伝ってくれてありがとう。再生コードを追加する場所はどこですか?
from random import randint
player = input('rock, paper or scissors?')
print(player, 'vs', end=' ')
chosen = randint(1,3)
#print(chosen)
if chosen == 1:
computer = 'rock'
elif chosen == 2:
computer = 'paper'
else:
computer = 'scissors'
print(computer)
if player == computer:
print('DRAW')
elif player == 'rock' and computer == 'paper':
print('COMPUTER WINS')
elif player == 'rock' and computer == 'scissors':
print('YOU WIN')
elif player == 'paper' and computer == 'scissors':
print('COMPUTER WINS')
elif player == 'paper' and computer == 'rock':
print('YOU WIN')
elif player == 'scissors' and computer == 'rock':
print('YOU WIN')
elif player == 'scissors' and computer == 'paper':
print('COMPUTER WINS')
埋め込みコードを内のすべてをwhileループ – BadMiscuit
すべてをwhileループに入れ、もう一度再生条件を追加してください:) – Abhijeetk431