fixed annotation

This commit is contained in:
2023-12-01 09:05:24 +01:00
parent 3e68bb0495
commit 55287b4ba3
2 changed files with 7 additions and 7 deletions

View File

@ -132,7 +132,7 @@
Man kann alles rekursiv Aufbauen mit Operatoren (`+, -, *, /, %, //, &&, and, ...`), also auch Listen oder Strings
```python
def all_fac(max: int) -> list[(int, int)]:
def all_fac(max: int) -> list[tuple[int, int]]:
if max == 0: # Abbruchbedingung
return [(0, 1)]
return [(max, fac(max))] + all_fac(max - 1) # Rekursion

View File

@ -27,7 +27,7 @@ def ack(n: int, m: int) -> int:
return ack(n - 1, ack(n, m - 1))
def all_fac(max: int) -> list[(int, int)]:
def all_fac(max: int) -> list[tuple[int, int]]:
if max == 0: # Abbruchbedingung
return [(0, 1)]
return [(max, fac(max))] + all_fac(max - 1) # Rekursion