lundi 13 novembre 2023

Assigning random unique letters to numbers

I am trying to assign random letters to 8 subjects and my desire output is like this:

| ID       | Subject |
| -------- | --------|
|1001      | B       |
|1002      | C       |
|1003      | D       |
|1004      | E       |

I tried this code but I a keep getting duplicates:

rand-let=char('BCDE', rand('integer',4));

And I am note sure why this question is being marked as negative!!!




Aucun commentaire:

Enregistrer un commentaire