Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. def cubo_tres():
  2.     """
  3.     Retorna el cubo de 3.
  4.     """
  5.     return 3 * 3
  6.    
  7. print(cubo_tres())
  8.  
  9. print()
  10.  
  11. def factorial(num):
  12.     """
  13.     Calcula el factorial de un nĂºmero dado.
  14.     """
  15.     fact = 1;
  16.     idx = 1;
  17.     while idx <= num:
  18.         fact *= idx
  19.         idx += 1
  20.        
  21.     return fact
  22.    
  23. print(factorial(7))