First 9 prime Fibonacci number: Difference between revisions
Fix Python solution to match output
Alextretyak (talk | contribs) (Added 11l) |
Alextretyak (talk | contribs) (Fix Python solution to match output) |
||
Line 1,230:
a, b, = 1, 1
fibn = 3
f = []
while len(f) < n:
a, b, = b, a + b
if prime(b):
f.append(b)
print("fib(%d): %s (%s s)" % (
fibn += 1
</syntaxhighlight>
{{out}}
|