invalid syntax bei der Eingabe?
Verfasst: Montag 14. März 2022, 09:15
Hallo Leute,
ich mache gerade die Aufgabe 16 von:
https://trainyourprogrammer.de/index.pl ... llposition
Vokale zählen in einem Satz.
Wenn ich jetzt zum Beispiel "Am Anfang sind" eingebe bekomme ich einen - SyntaxError: invalid syntax - und ich verstehe nicht warum. Kann mir jemand bitte helfen das zu verstehen!?!
Grüße
ich mache gerade die Aufgabe 16 von:
https://trainyourprogrammer.de/index.pl ... llposition
Vokale zählen in einem Satz.
Code: Alles auswählen
import re
string = ""
A = 0
E = 0
I = 0
O = 0
U = 0
while True:
try:
string = str(input("Geben Sie einen Satz ein:"))
break
except KeyboardInterrupt:
break
except:
print("Es gab ein Fehler bei der Eingabe!")
pass
A = len(re.findall('[Aa]', string))
print(A)
Grüße