How would you compute the number of ways to reach the n-th step when you can jump 1 or 2 steps?
Implement the function below. A path is an ordered sequence of jumps, so jumping 1 then 2 differs from jumping 2 then 1. Define n = 0 as one valid way: taking no jumps.
n is a nonnegative integer. Return the exact number of distinct ways to reach step n.
Function signature: count_ways(n)
def count_ways(n):