theoinf-exercise/exercise_1/task2.py

12 lines
150 B
Python
Raw Normal View History

2026-04-30 16:08:36 +02:00
def g(x):
return (x + x)
def f(x):
if (x < 0):
d = 0
if (x == 0):
d = 1
else:
d = g(f((x - 1)))
return d