n=int(input('enter number:')) num1,num2=0,1 print(num1,num2,end=' ') for i in range(2,n): num3=num1+num2 num1=num2 num2=num3 print(num3,end=' ')
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter