Olli Graf
5 months ago
2 changed files with 20 additions and 0 deletions
@ -0,0 +1,10 @@ |
|||
# Ohne Walross-Operator |
|||
n = 0 |
|||
while n < 10: |
|||
n += 1 |
|||
print(n) |
|||
|
|||
# Mit Walross-Operator |
|||
n = 0 |
|||
while (n := n + 1) <= 10: |
|||
print(n) |
@ -0,0 +1,10 @@ |
|||
# Ohne Walross-Operator |
|||
n = 0 |
|||
while n < 10: |
|||
n += 1 |
|||
print(n) |
|||
|
|||
# Mit Walross-Operator |
|||
n = 0 |
|||
while (n := n + 1) < 10: |
|||
print(n) |
Loading…
Reference in new issue