id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

david.white@denison.edu cs111fall2019 > Fibonacci
prev  |  next  |  chance

Given an input n, return the n-th Fibonacci number. Recall that the Fibonacci sequence is 1, 1, 2, 3, 5, 8, 13, ... (each number is the sum of the two before it).


Fibonacci(2) → 1
Fibonacci(5) → 5
Fibonacci(6) → 8

...Save, Compile, Run (ctrl-enter)

def Fibonacci(n):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 150 Post-solution available

Copyright Nick Parlante 2017 - privacy