β back to unit
Medium
# puzzle gauntlet medium
Fibonacci's Bunnies
The famous bunny sequence: each month's count is the sum of the previous two. 1, 1, 2, 3, 5, 8β¦ π
You get n. Print the n-th bunny number (the 1st and 2nd are both 1). Two running variables are all you need β remember dual-tracking from your very first unit?
Example:
Input: n = 7
Output: 13
The sequence runs 1, 1, 2, 3, 5, 8, 13 β the 7th number is 13.
π‘ need a hint?
pg-fibonacci-bunnies.pyπ given lines are locked β write your code in between
loading...