Seite 1 von 1

inconsistent use of tabs and spaces in identation

Verfasst: Donnerstag 31. Januar 2019, 10:04
von Johanna
Hallo, ich habe grade einige Probleme an einer Stelle meines Codes weiter zukommen.
Mir wird mir folgene Fehlermeldung angezeigt: inconsistent use of tabs and spaces in identation.

Danke für eure Hilfe

Code: Alles auswählen

  if EINHEIT in Kn:
                return "Knoten"
        elif EINHEIT in mps:
                return "m/s"
        elif EINHEIT in kmph:
                return 'km/h'
        elif EINHEIT in mph:
                return 'mph'

        else:print(' {} es handelt sich um keine definierte Einheit nur: Kn, mps,kmph oder mph'.format(EINHEIT))
                        sys.exit()

Re: inconsistent use of tabs and spaces in identation

Verfasst: Donnerstag 31. Januar 2019, 10:08
von __deets__
Hast du mal die Fehlermeldung gegoogelt? Und einmal in ein Grundlagentutorial geschaut? Einrückungen sind in Python sehr wichtig, und müssen konsistent sein. Was das genau bedeutet erklär einem zb das offizielle Tutorial hier https://docs.python.org/3/tutorial/intr ... rogramming

Re: inconsistent use of tabs and spaces in identation

Verfasst: Donnerstag 31. Januar 2019, 15:32
von ThomasL