teil24 angelegt.
This commit is contained in:
@@ -26,7 +26,9 @@ CC-BY-SA Olli Graf
|
|||||||
|19 | Webseiten (Flask)|
|
|19 | Webseiten (Flask)|
|
||||||
|20 | virtuelle Umgebungen|
|
|20 | virtuelle Umgebungen|
|
||||||
|22 | Numpy|
|
|22 | Numpy|
|
||||||
|21 | Matplotlib|
|
|23 | Matplotlib|
|
||||||
|23 | Pandas|
|
|24 | match|
|
||||||
|
|25 | Pandas|
|
||||||
|
|26 | Pygame|
|
||||||
|
|
||||||
|
|
||||||
|
6
teil24/.gitignore
vendored
Normal file
6
teil24/.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# created by virtualenv automatically
|
||||||
|
__pycache__
|
||||||
|
bin
|
||||||
|
lib
|
||||||
|
share
|
||||||
|
*.csv
|
23
teil24/print_tag_elif.py
Normal file
23
teil24/print_tag_elif.py
Normal file
@@ -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
Normal file
28
teil24/print_tag_switch.py
Normal file
@@ -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
Normal file
28
teil24/print_tag_switch_str.py
Normal file
@@ -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
Normal file
8
teil24/pyvenv.cfg
Normal file
@@ -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
|
Reference in New Issue
Block a user