ABOUT ME

I live in a camper van with a West Highland Terrier for company.
My passion is creating images but it is a work in progress.
I am always willing to share what knowledge I have and can be contacted through the comments on this post or e-mail ADRIAN
ALL IMAGES WILL ENLARGE WITH A LEFT CLICK

Saturday 19 February 2022

THIS WORKS.

 The Fibonacci Sequence or Golden Ratio. I didn't sleep well last night so got up and tried to recall how I got the computer to create a Fabonacci sequence. I've done it before but I must admit I struggled over something so simple that I got tired and fell asleep. It did the job.


This works now, it is quite satisfying when a computer instantly produces a series of adding ups. 
(a)  is the number you want it to iterate to.
the x, y bit and visa versa is Pythonese for making it use the last value when it starts a new iteration. I think. Ignore the left hand window, that just shows that x + y gives x for each iteration.

The above is it doing my birthday.

It's a beautiful day here. I went into Cupar first thing and despite slip sliding survived intact. The back roads are pretty grim with frozen melt water and hard rutted snow. Not to worry it livens up a dull drive.



No wind damage here and I hope you faired the same.


2 comments:

  1. I gave up computer programming after GFA Basic and BBC Basic. Tried to come to terms with C++ some years ago but failed. Just the occasional dabble with Arduino these days. Python looks interesting.

    Plenty of very gusty wind yesterday. We have had our normal February snow - a couple of hours of large soft flakes which melted after a short while.

    ReplyDelete
  2. I find it a touch difficult, I do have a massive course folder from Glasgow University all about Python. It doesn't stop me missing spaces, indents, commas or other such idiocy. I usually just copy and paste.
    I can do G-Code for machines but am very slow at it.
    Heavy rain overnight and it's still doing it. Dread to think what the roads are like.

    ReplyDelete