46
Vývoj / Re:Python factorial
« kdy: 15. 01. 2021, 08:46:38 »Šlo by to zjednodušit na práci čiste s čísly, kdyby to bylo potřeba:Kód: [Vybrat]def f(max_depth, num = 0, cur_depth = 1):
num = num*10 + cur_depth
print(num)
if cur_depth < max_depth:
f(max_depth, num, cur_depth + 1)
print(num)
f(3)
... to ale funguje jen do 9
