How to Count by X in Python
The challenge
Create a function with two arguments that will return an array of the first (n) multiples of (x).
Assume both the given number and the number of times to count will be positive numbers greater than 0.
Return the results as a list.
Examples
The solution in Python code
Option 1:
Option 2:
Option 3:
Test cases to validate our solution
|
|