DXC Platform X services may need a predictable sequence of Fibonacci-based values for workload simulation and test data generation. Given a non-negative integer n and a positive modulus mod, return the first n Fibonacci numbers, with every value reduced modulo mod.
The sequence starts with F(0) = 0 and F(1) = 1. Each later value is calculated as F(i) = F(i - 1) + F(i - 2). The returned list must preserve this order.
Implement fibonacci_series(n, mod).
n, an integer representing the number of terms, and mod, a positive integer modulus.n integers, where the element at index i is F(i) % mod.n = 0, return an empty list.def fibonacci_series(n, mod):