How do you make mit app inventor code select a random button and a random number to match up with each other?

how to make mit app inventor code select a radom button and a radom number to match up with each other i am trying to get the button pressed at radom and have the funtion work and then geet a random number selected to match the random buttom

Put your button components in a list and pick a random item to get a random button

To match with a random number you might want to use the corresponding index of that button in the list

Taifun

Depending on the number of buttons, it may also be useful to make use of the every Button block in the Any Button drawer under Any Components.