Quiz Week 8

Fibonachess flickr photo by fdecomite shared under a Creative Commons (BY) license

Two Activities

  • Please fill out our mid-semester survey. This will not take long at all and in the spirit of non grading based on points, there is simply two open questions. How can you improve and how can Ken help you improve your learning.
    Fill out that survey here: http://url.kenbauer.me/midtermsurvey
  • Write a function that calculates returns the “nth” Fibonacci number where we define a function over the Fibonacci numbers mapping the naturals (starting with zero) to the Fibonacci series. So fibonacci(0) returns 0, fibonacci(1) returns 1, fibonacci(2) returns 1 and so on. Note that we are using the modern definition where the sequence starts with zero. You should try to implement this with two solutions: one with a loop and one with recursion. Which do you think is “better”, which looks more “elegant”, which is more “efficient”?

Featured Image Credit

<a title="Fibonachess" href="https://flickr.com/photos/fdecomite/3200758169">Fibonachess</a> flickr photo by <a href="https://flickr.com/people/fdecomite">fdecomite</a> shared under a <a href="https://creativecommons.org/licenses/by/2.0/">Creative Commons (BY) license</a> </small>
Fibonachess flickr photo by fdecomite shared under a Creative Commons (BY) license

 

CC BY-SA 4.0 Quiz Week 8 by admin is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.