Don't like ads? PRO users don't see any ads ;-)
Guest

uno

By: a guest on May 5th, 2012  |  syntax: Python  |  size: 0.20 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. n = int(input('Ingrese N:'))
  2. inter = float(1/n)
  3. x = inter
  4. area = 0.0
  5. suma = 0.0
  6. if n!=0:
  7.     for i in range(0,2,1/n):
  8.         area = inter*(x **2)
  9.         suma += area
  10.         x += inter
  11.  
  12. print suma