Demoprogramme
This commit is contained in:
19
teil24/print_class.py
Normal file
19
teil24/print_class.py
Normal 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')
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user