Text Numbers
Sometimes numbers are needed as text rather than for calculations, such as labels, buttons, or screen output. Write a function fizz_array2 that takes a non-negative number n. Return a list of strings from 0 to n - 1, inclusive.
Примеры
Ввод
4Вывод
["0", "1", "2", "3"]Ввод
10Вывод
["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]Ввод
1Вывод
["0"]Нужно реализовать
def fizz_array2(n: int) -> list[str]:
Теги
listsarraystrings
Влез, за да видиш историята на решенията
ВходВлез, за да използваш ИИ ментора
ВходVisible tests
1
Input
4Expected
["0","1","2","3"]2
Input
10Expected
["0","1","2","3","4","5","6","7","8","9"]3
Input
1Expected
["0"]4
Input
0Expected
[]5
Input
3Expected
["0","1","2"]6
Input
7Expected
["0","1","2","3","4","5","6"]Focus radio
Paused · SomaFM · Fluid