fork download
  1. # your code goes here
  2.  
  3.  
  4. def serie1(n): #EJ 1. 4, 5, 9, 14, 23, 37
  5. serie=""
  6. a,b,c=3,1,0
  7. for i in range(0,n):
  8. c=a+b
  9. a=b
  10. b=c
  11. serie+= str(c) + " , "
  12. return serie
  13. print(serie1(6))
Success #stdin #stdout 0.02s 7080KB
stdin
Standard input is empty
stdout
4 , 5 , 9 , 14 , 23 , 37 ,