Last answered:

27 Feb 2023

Posted on:

26 Feb 2023

0

how is this approch

n1 = 0
n2 = 1
print(n1,end=' ')
print(n2,end=' ')

for i in range(1,19):
    n3 = int(n1 + n2)
    print(n3,end=' ')
    n1 = n2
    n2 = n3

1 answers ( 0 marked as helpful)
Instructor
Posted on:

27 Feb 2023

0

Hey Ayus,


Thank you for reaching out!


Your approach for displaying the first 20 Fibonacci numbers is very good and works flawlessly. Great job!


Kind regards,

365 Hristina

Submit an answer