Browse Source

teil24 angelegt.

master
Olli Graf 10 months ago
parent
commit
c01833f411
  1. 6
      Readme.md
  2. 6
      teil24/.gitignore
  3. 23
      teil24/print_tag_elif.py
  4. 28
      teil24/print_tag_switch.py
  5. 28
      teil24/print_tag_switch_str.py
  6. 8
      teil24/pyvenv.cfg

6
Readme.md

@ -26,7 +26,9 @@ CC-BY-SA Olli Graf
|19 | Webseiten (Flask)|
|20 | virtuelle Umgebungen|
|22 | Numpy|
|21 | Matplotlib|
|23 | Pandas|
|23 | Matplotlib|
|24 | match|
|25 | Pandas|
|26 | Pygame|

6
teil24/.gitignore

@ -0,0 +1,6 @@
# created by virtualenv automatically
__pycache__
bin
lib
share
*.csv

23
teil24/print_tag_elif.py

@ -0,0 +1,23 @@
import sys
num=5
def print_wochentag(num):
if num == 0:
print('Montag')
elif num == 1:
print('Dienstag')
elif num == 2:
print('Mittwoch')
elif num == 3:
print('Donnerstag')
elif num == 4:
print('Freitag')
elif num == 5:
print('Samstag')
elif num == 6:
print('Sonntag')
if __name__ == '__main__':
print_wochentag(int(sys.argv[1]))

28
teil24/print_tag_switch.py

@ -0,0 +1,28 @@
import sys
num=5
def print_wochentag(num):
match num:
case 0:
print('Montag')
case 1:
print('Dienstag')
case 2:
print('Mittwoch')
case 3:
print('Donnerstag')
case 4:
print('Freitag')
case 5:
print('Samstag')
case 6:
print('Sonntag')
case _:
print('unbekannte Eingabe')
if __name__ == '__main__':
print_wochentag(int(sys.argv[1]))

28
teil24/print_tag_switch_str.py

@ -0,0 +1,28 @@
import sys
num=5
def print_wochentag(num):
match num:
case '0':
print('Montag')
case '1':
print('Dienstag')
case '2':
print('Mittwoch')
case '3':
print('Donnerstag')
case '4':
print('Freitag')
case '5':
print('Samstag')
case '6':
print('Sonntag')
case _:
print('unbekannte Eingabe')
if __name__ == '__main__':
print_wochentag(sys.argv[1])

8
teil24/pyvenv.cfg

@ -0,0 +1,8 @@
home = /usr/bin
implementation = CPython
version_info = 3.11.2.final.0
virtualenv = 20.17.1+ds
include-system-site-packages = false
base-prefix = /usr
base-exec-prefix = /usr
base-executable = /usr/bin/python3
Loading…
Cancel
Save