Pardon our dust - Alteryx Academy is under construction. Lessons and courses completed on Community from now until January 20th will not be recorded.
Start Free Trial

Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #79: Find the Closest Prime Number

aplenos
アステロイド
スポイラ
aplenos_0-1663505829330.png

 

acarter881
クエーサー

Here's my solution.

スポイラ
my_weekly_challenge_79_solution.png
olga_strubbe
ボリード

 

スポイラ
olga_strubbe_0-1665159194660.png

 

  I used the same approach in solving the challenge as provided in the solution.  Learned a ton!  Thank you.

Divya_Bidarahalli
アステロイド

Solved it

Pete_Rodgers
Alteryx Alumni (Retired)
スポイラ
I did it the long inefficient way with more lines to process than others, as sqrt approach caused my brain too much pain.  However I learnt some new functions thanks to reviewing the official answers - ABS() and mod().  borrowed some formatting to lay it out nicer and break up the logic.

Pete_Rodgers_0-1666607915691.png

This was a really good challenge, that had me scratching my head, more about the Prime calculations than macros!

FinnCharlton
パルサー
スポイラ
FinnCharlton_0-1667898169551.png

 

Just don't use a number over ~6 digits! Could definitely be improved to deal with bigger numbers.

Kinga
アステロイド

Hi,

 

Please find my solution below,

 

スポイラ
Kinga_0-1667928774401.png

 

martinding
パルサー

 

スポイラ

79.png

97a.png

 

  

Reesetrain2
9 - Comet
9 - Comet

All,

 

I took the "R" Route!

スポイラ
Capture.PNG

AndrewHoData
アステロイド

Created analytic app solution where it finds closest prime number < Number

スポイラ
AndrewHoData_0-1669427943707.png


Just for reminder for future me to remember to tick this box so that it'll show up in the analytic app results

AndrewHoData_1-1669427996813.png


Tested with other values to see if it works

AndrewHoData_2-1669428036130.png