fizz_array_2¶
Given a number n, create and return a new string list of length n, containing the strings “0”, “1” “2” .. through n-1. N may be 0, in which case just return a length 0 list. Note: String.valueOf(xxx) will make the String form of most types. The syntax to make a new string list is: new String[desired_length] (See also: FizzBuzz Code)
This exercise was taken from codingbat.com and has been adapted for the Python language. There are many great programming exercises there, but the majority are created for Java.