hi i am diving into programming and wanting to find out the amount of time it takes to execute a fibonacci sequence program. i have had past expirience with c++ so i have that code. to make sure the way the program runs is the same, i would like it if this program used while loops, and other similar things. here is the c++ code -
#include <iostream>
using namespace std;
int main()
{
int n = 1000;
double first = 0;
double second = 1;
cout<<first<<" "<<second<<" ";
while (n--)
{
double third = first + second;
first = second;
second = third;
cout<<third<<" ";
}
}
so if anyone can "convert" this to python it would be appreciated