Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions 06/tasks/task_04_factorial.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# task_04_factorial.py


def factorial(n: int) -> int:
"""
Vrátí faktoriál čísla n.
"""
if n == 0 or n == 1:
return 1
else:
return n * factorial(n-1)


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

autopepu vadí dva prázdné řádky na konci souboru

Loading