Programmieren lernen mit PythonHPI-Student Team für Python

This video belongs to the openHPI course Programmieren lernen mit Python. Do you want to see more?

Ergebnisse - 4.1 Diskussion Aufgabe 3 - Teil 2

Time effort: approx. 11 minutes

An error occurred while loading the video player, or it takes a long time to initialize. You can try clearing your browser cache. Please try again later and contact the helpdesk if the problem persists.

About this video


Folie 19: Wenn anstelle von else eine weitere Abfrage mit elif verwendet wird, kann der Fehler vermieden werden. Eine mögliche Lösung wäre folgende if-Verzweigung:

if antwort == woerterbuch[vokabel]:
    print("Das ist richtig.")
elif antwort != "ende":
    print("Das ist falsch.")