Hong-Phuc Bui
2026-05-12 74d8c723ebd19a594688943b7d2cc06427f49993
Ordnerstrukturen an der Vorlsung angepasst
1 files modified
5 files renamed
4 files added
81 ■■■■■ changed files
01-ausdrucken/ausdruck.py patch | view | raw | blame | history
01-ausdrucken/fernseher.py patch | view | raw | blame | history
01-ausdrucken/hello-world.py patch | view | raw | blame | history
01-ausdrucken/rechtecke.py patch | view | raw | blame | history
02-ablaufsteuerung/guess-a-number.py patch | view | raw | blame | history
03-demo-datenstrukturen/csv-generator.py 18 ●●●●● patch | view | raw | blame | history
03-demo-datenstrukturen/datum.py 15 ●●●●● patch | view | raw | blame | history
03-demo-datenstrukturen/dna.py 23 ●●●●● patch | view | raw | blame | history
03-demo-datenstrukturen/kontinent.py 10 ●●●●● patch | view | raw | blame | history
uebungsblatt-2/printSeven.py 15 ●●●●● patch | view | raw | blame | history
01-ausdrucken/ausdruck.py
01-ausdrucken/fernseher.py
01-ausdrucken/hello-world.py
01-ausdrucken/rechtecke.py
02-ablaufsteuerung/guess-a-number.py
03-demo-datenstrukturen/csv-generator.py
New file
@@ -0,0 +1,18 @@
"""
1, Anna
2, Bob
3, Eva
4, Peter
"""
namen = [("Anna", 2000), ("Bob", 1991), ("Eva", 2002), ("Peter",2002)]
csv = ""
for n in name:
    print(n)
for idx,n in enumerate(namen):
    person_info = f"{n[0]}, {n[1]}"
    csv += f"{idx+1}, {person_info}\n"
print(csv)
03-demo-datenstrukturen/datum.py
New file
@@ -0,0 +1,15 @@
wochentage = ["SON", "MON", "DIN", "MIT", "DON", "FR", "SAM"]
monaten = [None,
"JAN", "FEB", "MAR", "APL",
"MAI", "JUN", "JUL", "AUG",
"SEP", "OKT", "NOV", "DEZ"]
x = monaten[1::4]  # Monaten JAN, MAI, SEP
print(x)
y = monaten[1:8:2] # JAN, MAR, MAI, JUN
print(y)
z = monaten[1:8]
print(z)           # JAN, FEB ... , JUL
a = monaten[-1:1:-2]
print(a)
03-demo-datenstrukturen/dna.py
New file
@@ -0,0 +1,23 @@
"ACGT-TCGA-AACC-ACCT-CCTA"
{
    "A": 2,
    "C": 3,
    "G": 4,
    "T": 2
}
def count_agct(dna:str) -> dict[str,int]:
    table = {
        "A": 0, "C": 0, "G": 0, "T": 0
    }
    erlaubt_zeichen = table.keys()
    for c in dna:
        molecule = c.upper()
        if molecule in erlaubt_zeichen:
            count = table[molecule]
            table[molecule] = count + 1
    return table
t = count_agct("ACGT-AACc-CGGTT")
print(t)
03-demo-datenstrukturen/kontinent.py
New file
@@ -0,0 +1,10 @@
farbe = {
    "red": "#FF0000",
    "green": "#00FF00",
    "blue": "#0000FF",
    "hervorhebung": "#fff34f",
    "achtung": "#ff5e42"
}
uebungsblatt-2/printSeven.py
@@ -1,3 +1,6 @@
import sys
def print_seven(a, b):
    n = a
    # suche die erste Vielfach von 7
@@ -15,10 +18,10 @@
        n += 7
try:
    a = int(sys.argv[1])
    b = int(sys.argv[2])
    print_seven(a, b)
except ValueError:
    print(f"CLI Syntax: `python {sys.argv[0]} <int> <int>`")
a = input("Geben Sie eine natürliche Zahl ein! ")
a = int(a)
b = input(f"Geben Sie eine andere natürliche Zahl ein, die größer als {a} ist! ")
b = int(b)
print_seven(a, b)