Quiz_8

Hello, Young Padawans!

This time I´ll teach you how to get through quiz#8.

The main topic of this quiz is the Fibonacci Series. A special serie where the two previous numbers summatory gives you the next number. You can see it here:

http://www.disfrutalasmatematicas.com/numeros/fibonacci-sucesion.html

Knowing this is quite simple how to do it.

quiz8

As you can see, since the series starts with 0, if the user ask you for the first term, you will have to return 0, and also for the second and third term you will have to use ifs in order to return “1”.

And for any other term just use the formula.

Simple

kronk

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s