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 #478: Build a Coin Flip Simulation App

AYXAcademy
Alteryx
Alteryx

Full Width - WC banner.svg

Hi Community members,

 

A solution to last week’s challenge can be found here.

 

In this week’s challenge, you apply your skills with formulas, macros, and analytic apps to simulate a basic probability experiment: flipping a coin. This challenge helps you practice building iterative logic and user-driven apps in Alteryx Designer.

 

Here are the steps you need to follow to build the flip-coin app:

 

  1. Create an Iterative Macro (`Coin Flip Macro.yxmc`) that repeats the coin flip simulation for a specified number of times. This macro should:
    1. Initialize with a Text Input containing iterations, head count and tail count.
    2. Update the counts on each iteration.
    3. Use a condition to stop once the iteration count reaches the user-specified total.
  2. Once the macro is created, build the analytic app that does the following:
    1. Prompts the user with a Text Box question: "How Many Coin Flips?"
    2. Passes this input into the macro to determine the number of simulations it runs.
    3. Displays how many times "Heads" and "Tails" occurred.

 

Once you have completed your challenge, include your solution file and a screenshot of your workflow as attachments to your comment.

 

Good Luck!

The Academy Team

 

Download Start File

 

Download Solution File

DylanBell
10 - Fireball
Spoiler
Screenshot 2025-05-27 144715.pngScreenshot 2025-05-27 144736.png


Time taken: 15:24

This was a great refresher for Analytical Apps, thank you!


Bulien
RolandSchubert
16 - Nebula
16 - Nebula
Spoiler
478.jpg
BS_THE_ANALYST
15 - Aurora
15 - Aurora

Went for a macro with a chart. I normally don't use pie charts but given the shape it seems fitting! 👀👀

Spoiler
Time Taken: 13:11

Macro front face
Screenshot 2025-05-27 152213.png

Pie chart (plain Jayne)
Screenshot 2025-05-27 152227.png
Inside ze macro. I like the generate rows
Screenshot 2025-05-27 152616.png

 

 

All the best,
BS

LinkedIN

Bulien
Erin
11 - Bolide

[Update] = Just realized the prompt said text input not that I had to use a Text box. Probably need to read the question better to start off with. One of the reasons I'm so bad at tests.....

[Original rant]
I did not want to use a Text Box for a numeric value input.....but I did it anyway and added an error message to make sure my peeps actually put in a numeric value, AND then I had my little action tool convert whatever was put in that text box to a number and round that sucker to a whole number, AND my error message used a between formula so that it would match the max number of iterations on my batch macro (which I increased to a 1000, why not?). 

 

Trust issues? Yes, 100% yes😅 I'm sure there's probably other ways to break this even with all the ID10T error proofing I tried to put in place. Oh well, have fun!

 

Spoiler
478 app478 app478 macro478 macro

 

 

Louie-Horn
7 - Meteor
Spoiler
Screenshot 2025-05-27 155632.png

Screenshot 2025-05-27 155701.png

 

ahsanaali
11 - Bolide
Spoiler
478.png

Tofel
9 - Comet
Spoiler
Challenge 478.jpg

Challenge 478b.jpg

AkimasaKajitani
17 - Castor
17 - Castor

My solution!

 

Spoiler
image.png

image.png

lucasquintieri98
8 - Asteroid

My solution, finally getting to use an iterative macro after months.