community
cancel
Showing results for 
Search instead for 
Did you mean: 
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Weekly Challenge
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Unable to display your progress at this time. Please try again a little later, or contact an administrator if you continue to see this error.
Getting started with Designer? | Start your journey with our new Learning Path!

Challenge #187: Generate Prime Numbers

Asteroid

Here is my very un-mathematical solution.  works up to 1000, but would probably blow up a computer if ran for a large number.

Spoiler
challenge_187_PD spoiler.JPG
Quasar

My solution:

 

Spoiler
Haha, my CLUNKY solution. I really enjoyed seeing other (MORE EFFICIENT!) solutions to this challenge.

Capture.JPG

Spoiler
Declanh94_0-1572542698415.png

First weekly challenge!

Alteryx Certified Partner
Spoiler
187a.PNG
187macro.PNG


 

Asteroid

First challenge completed!

 

Spoiler
weekly challenge 187 solution.png
Meteor

Good fun! Solution is attached and available below

 

Spoiler
Chalenge 187 Solution.png

 

A little of a mess with the flags & logic in the formula tool, but surprisingly easy!

 

I've never used the generate Rows before - thought it would be better to use it in a batch macro - but the duplicated Append Fields method is much easier.

Meteoroid

I tried two different versions - Brute force and using the method 'Sieve Of Eratosthenes'

The first one crashed around 100,000 records while the second can output results for 10M of records in 1 minute.

 

GGard_0-1572605207247.png

Pulsar
Pulsar
Spoiler
Love a good math problem!
Capture.PNG

Meteoroid

My attempt. Couldn't think how to tackle this easily using Alteryx tools, so had a go using the Python tool. Getting a strange error though regarding metadata, but outputs the answer.

Spoiler
jcktwnsnd_0-1572612555831.png