Skip to content

Commit

Permalink
BBLUB
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDiver committed Sep 30, 2024
1 parent 0358a77 commit 8155579
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
11 changes: 11 additions & 0 deletions exercises/code/fib_down.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
def fib_normal(n: int):
elements = [0, 1]
for i in range(n):
elements.append(elements[i] + elements[i+1])

for i in range(n):
# Man beachte hier das Element an der Stelle 0 wird hier nicht ausgegeben da n-i minimal 1 werden kann
print(elements[n-i])

fib_normal(10)

32 changes: 32 additions & 0 deletions exercises/code/fib_up.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
def fib_normal(n: int):
a: int = 0
b: int = 1
for _ in range(n):
print(b, end=", ")
tmp = b
b = a + b
a = tmp
print()

fib_normal(10)

x = "1"
x_int = int(input())

x: str = input()
y: str = input()

def mod(a: int, b:int):
return a % b


if x % 2 == 0:
...

elif x % 3 == 0:
...

elif x % 4 == 0:
...


0 comments on commit 8155579

Please sign in to comment.