Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Fibonacci Sequence Kata - TDD

Fibonacci Sequence Kata - TDD

Pure TDD example Kata

Jonathan Cook

August 12, 2013
Tweet

More Decks by Jonathan Cook

Other Decks in Programming

Transcript

  1. What is the Fibonacci Sequence A sequence of numbers in

    which each number equals the sum of the two preceding numbers. 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ...
  2. La Idea hoy es que probeis la kata en parejas

    Y Los ultimos veinte minutos voy a mostraros mi solucion en la tele!
  3. Fibonacci Sequence Generator Write some code to return the Fibonacci

    number for a given position. Only for positions between 0 and no greater than 46 Example - position 8 would return 21 Try and use the TDD techniques we talked about last time.
  4. Un Poco mas Adapt your sequence generator: Give me the

    sequence of fibonacci numbers for a given sequence number between 8 and 50. e.g) for 8 - 0,1,1,2,3,5,8,13