Phyton Einrückung?
Ich hab das nicht verstanden wie die Einrückung funktioniert.Ich habe 3 probleme eine verteh ich nicht
Statement expected, found Py:DEDENT:51
Unexpected indent:36
Indent expected:23
den in zeile 51 versteh ich nicht und bei den anderen weiß ich ich nicht wie ich sie löse
Code:
import random
player_choice = 0
KI_choice = 0
KI_points = 0
player_points = 0
status = 0
game = 1
while game == 1:
while status == 0:
print("""
""")
print("Deine Punkte: " + str(player_points))
print("KI Punkte: " + str(KI_points))
player_choice = (int(input("Schere [1], Stein [2] oder Papier [3]")))
KI_choice = random.randrange(1, 4)
status = 1
# überprüfung
if status == 1:
# Unentschieden
if player_choice == KI_choice:
print("Unentschieden")
# schere
elif player_choice == 1:
if KI_choice == 2:
print("Verloren KI gewinnt mit Stein gegen schere")
KI_points = KI_points + 1
# stein
elif player_choice == 2:
if KI_choice == 1:
print("Gewonnen KI verliert mit Schere gegen Stein")
player_points = player_points + 1
elif KI_choice == 3:
print("Verloren KI gewinnt mit papier gegen Stein")
KI_points = KI_points + 1
# papier
elif player_choice == 3:
if KI_choice == 1:
print("Verloren KI gewinnt mit Schere gegen papier")
KI_points = KI_points + 1
elif KI_choice == 2:
print("Gewonnen KI verliert mit Stein gegen Papier")
player_points = player_points + 1
status = 0
PC,
Computer,
programmieren,
Informatik