fork download
  1. def fib(10):
  2. a=1.0
  3. b=0.0
  4. c=0.0
  5. for i in range(0,n+1):
  6. c=b
  7. b+=a
  8. a=c
  9. return b/n
  10. print fib(7)
Runtime error #stdin #stdout 0.02s 4672KB
stdin
Standard input is empty
stdout
Standard output is empty