##############################################################################
# Parte do livro Introdução à Programação com Python
# Autor: Nilo Ney Coutinho Menezes
# Editora Novatec (c) 2010-2024
# Quarta Edição - Março/2024 - ISBN 978-85-7522-886-9
#
# Site: https://python.nilo.pro.br/
#
# Arquivo: capítulo 08/08.04 - Outra forma de calcular o fatorial.py
##############################################################################
def fatorial(n):
fat = 1
x = 1
while x <= n:
fat *= x
x += 1
return fat