A number is called pandigital if it uses all of the digits from 1 to n exactly once, where n is the number of digits in the number. So, for example, the five-digit number 15432 is pandigital, but the five-digit number 11132 is not. Again, the four-digit number 4123 is pandigital, but the four-digit number 8312 is not. Finally, the one-digit number 1 is pandigital, but the one-digit number 3 is not. The next few exercises about these numbers can be found under the "Pandigital" sprite in the starter file. For all of the blocks on this page, you should use higher-order functions in your solution. You cannot use explicit recursion or the yellow and orange loop constructs (such as repeat, repeat until, and for); you can, however, use the built-in list blocks in the Variables tab and the HOF blocks from "import tools." You will find the blocks that you created on the last page useful.

Create the block
is number pandigital?
that checks if a number satisfies the definition above. The block should, for example, report true for:
is  15432 pandigital?
and false for:
is  11132 pandigital?

Using the block you created above, create the block
list all pandigital numbers between min and max
that lists all the pandigital numbers between the first and second inputs, inclusive. For example,
list all pandigital numbers between 1 and 135
should report
(1, 12, 21, 123, 132)

It might be nice to have our sprite say the list we calculated above (or any list, really). Create the block
display nicely list
that, when given the input
display nicely (1, 12, 21, 123, 132)
reports the string "1, 12, 21, 123, 132". We can then place this block in a say block.