Ich habe begonnen, an diesem Programm zu arbeiten, das Rock, Paper Scissors gegen Sie spielen sollte. Ich habe verschiedene Modelle ausprobiert und dieses ist das nächste. Das einzige Problem ist, dass es einen Syntaxfehler hat, von dem ich keine Ahnung habe, wie ich es beheben kann.Programm Syntax Fehler
#Macchiat0
#3, 6, 2016
#3. RPS is played between the computer and a single user.
#The player is prompted for a throw when 1 corresponds
#to Rock, 2 to Paper, and 3 to Scissors.
#A random number between 1 and 3 is generated for the computer throw.
#The winner is determined based on the rules of Rock Paper and Scissors.
#Program Menu
import random
end_game = True
while end_game == True:
print('1. Enter 1 for Rock ')
print('2. Enter 2 for Paper ')
print('3. Enter 3 for Scissors ')
print('4. Quit')
ans = int(input('What do you want to do?: '))
if ans=="1":
print("\n Enter 1 for Rock: ")
if Player game = 1
print('You win')
if Player game = 2
print('You loose')
if Player game = 3
print('You draw')
if ans =="2":
print("\n Enter 2 for Paper: ")
if Player game = 1
print('You win')
if Player game = 2
print('You loose')
if Player game = 3
print('You draw')
if ans =="3":
print("\n Enter 3 for Scissors: ")
if Player game = 1
print('You win')
if Player game = 2
print('You loose')
if Player game = 3
print('You draw')
elif ans=="4":
print("\n Goodbye")
break
else:
print("\n Not Valid Choice Try Again")
Bitte posten Sie den Fehler, den Sie bekommen. Ohne es fällt es uns schwer zu sehen, was falsch ist. – marcelm