Berufsschule/S1/LF5/2022-02-07_Musterklausur/Aufgabe4.py

24 lines
336 B
Python
Raw Permalink Normal View History

2022-02-13 18:09:17 +01:00
#!/usr/bin/env python3
def generatePasswort(name):
vokale = "aeiouäöüAEIOUÄÖÜ "
pw = ""
for n in name:
if n not in vokale:
pw += n
return pw
tests = [
"Isabell Bauer",
"Markus Müller",
"Annie Claasen",
]
for t in tests:
print(t, ":", generatePasswort(t))
print(generatePasswort(input("Name: ")))