Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Ich bin am Verzweifeln.

Ich versuche mich gerade an einem kleinen Spiel mit Python. (Kein pygame.) Das Spielfeld ist eine 24-Elemente lange Liste. Auf Feld n ist mein Spielstein. Ich will überprüfen, ob ich auf Feld n-14 (das in diesem Fall den Index 8 hat) ziehen kann.

Wenn ich versuche, das Spiel mit Breakpoints zu debuggen, komme ich zur zweiten if-Abfrage, die wird überprüft, für falsch befunden und das, was in der else-Anweisung steht ausgeführt.

if list[n-7]["text"] == "A" and list[n-14]["text"] == "":
  if list[n-14] == 8:
    new_list.append(8)
  else:
    pass

Ich habe schon alles mögliche versucht. Ich habe es mit "if ... != ... : append" versucht und auch mit "if ... == ... : pass". Immer mit dem gleichen Ergebnis.

Hat jemand eine Idee...?

  • 5 Monate später...

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.