Product of primes

I’m setting some questions on expressing a number as a product of primes. I’m just a bit stuck on a method of checking the various allowable answers. eg: 22235 or 2^335 etc.

Has anyone done this in an activity?

I was thinking of just writing some code to test whether the input has 2 factors but I’m not sure how to get the input. I could just put a table in and check each cell in the table ? Is there a way to take comma separated values or something?

If you want to list the factors as a product, I think using a pattern match would work well.

If you want factors separated with a comma, I would suggest using countNumberUsage.