Uno2K

Aula5 - calcula_euler

Sep 16th, 2021
743
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def calcula_euler(x, n):
  2.     expoente = 1  
  3.     divisor = 2
  4.  
  5.     const = pow(x, divisor)/(divisor*n)
  6.  
  7.     expoente += 1
  8.     divisor += 1
  9.  
  10.     euler = 1 + x + const
  11.     print(const)
  12.     print(euler)
  13.  
  14. euler_true = True
  15. desliga = 0
  16.  
  17. while euler_true:
  18.     print(calcula_euler(1, 1))
  19.     desliga += 1
  20.     if desliga > 10:
  21.         break
  22.  
RAW Paste Data