Random number generator (lottery)

Closer, but still not correct.

Try something like this:

oops - see below

You may want to sort the numbers in the list after they have been generated.

2 Likes

This solution would leave you short of 7 numbers if you got any duplicates.

There are two solutions at

1 Like

Yes, left out a counter:

3 Likes

That is my designer... I hope u can understand my language. I'm from Slovenia but i think if u do this often u dont need translate... Text for label its just title...but just in case u need translate:
število=number
prvo=first
drugo= second,.....
generiraj števila=generate numbers

Try this: lottery_7.aia (11.9 KB)

grafik

2 Likes

where can i find call (puprple) block?

Or this:

1 Like

Get current millis using Clock component.
Somehow get last 7 digits.

I cant find call ListAddon1. bubbleSort list....i have only three purple blocks

grafik

1 Like

Hmm, for what purpose? How should that help?

To generate a random 7 digit unique number.
However, digits will not be unique, always.

And agan:

But 7 numbers between 1 - 100 are required, and not 7 digits.

3 Likes

Are there any other solutions for saving my problem, don't get me wrong your replays were solutions but i just wanna know diffrent ways if they are

probably hundreds, only limited by your imagination and creativity....

With an extension:
loteria222

borrar_lott.aia (8.7 KB)

https://groups.google.com/g/mitappinventortest/c/59KuusuzAiU

1 Like

thanks yall

First, make a list.

Blocks

either...

  1. initialize [name] to {{:gear: create empty list}
    or
  2. create list with {

Next, make a text label or any thing that supports text.

Object Examples

TextLabel
Notifyer
TextInput

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.