Demoprogramme

This commit is contained in:
2024-02-02 13:47:29 +01:00
parent 3963f98baa
commit e2676beee0
4 changed files with 72 additions and 0 deletions

19
teil24/print_class.py Normal file
View File

@@ -0,0 +1,19 @@
def print_match(name):
print(f'name={name}')
match name:
case 'Lisa'|'Ralph'|'Janey':
print('zweite Klasse bei Ms. Hoover')
case 'Bart'|'Milhouse'|'Nelson':
print('vierte Klasse bei Ms. Krabappel')
case _:
print('unbekannt')
print_match('Lisa')
print_match('Milhouse')
print_match('Homer')