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

Fireball

Thanks for the challenge, @Shreelatha! I decided to try the Python tool this week.

 

 

Spoiler
challenge_187_workflow.PNG

kelly_gilbert_1-1572620688928.png

 

 

Spoiler
Challenge 187.PNG

Has anyone attempted this using the R input tool?

Atom

My solution. Seems to work for other up-to numbers. First time I have generated a fairly clean solution in a relatively short time. Nice challenge!

here is my attempt struggled to get 1 in there!

Spoiler
Thorntonb_1-1572631331558.png

 

Fun one. Set mine up to find all primes from 1 - whichever value you feed it. Plug in 2019 to see if you were born in a Prime year.

Asteroid

This was so much fun to do. Two files included (main portion and the batch macro) 

 

Spoiler
I created a macro that processed through the generated list of numbers in the source input. tested it for 50, 100 and 1000 (was slow)... not sure how large it can go before the performance would degrade completely. 

It checks divides each number by the entire list to find a count of any calculations that resulted in a whole number. if count is 0 then it gets left at the end. I had to hard code 1 and 2 to be removed from the results. 
Meteor

In order to speed up, only divisors up to FLOOR(SQRT(number)) needs to be verified whether they will lead to MOD(number, divisor) = 0.

 

Spoiler
LiD_3-1572739967475.png

Two approaches - the second one works the most efficient

 

Spoiler
challenge_187_SEH.PNG

 

Quasar

Definitely not the most efficient way.

 

Spoiler
Capture.PNG