# Game:Main Page/Editing Guideline/Random

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

## editMethod 1 - <option>

```<choose>

<option weight=(optional)>（Text A）</option>

<option weight=(optional)>（Text B）</option>

(...)

</choose>
```
“You can use it in quota template (B)”
~ This an example

<option> is

### editmassive use

```<choose><option weight=1>ａ</option><option weight=1>ｂ</option></choose>
```

ａ ｂ ｂ ａ ｂ ｂ ｂ ａ ｂ ａ

The result probably will repeats when you refresh the webpage.

## editMethod 1 - Template:Rand

This template is using the time to generate a random number.

```{{Rand| (range) | (seed) | (prime) }}
```

• {{Rand}}　72
• {{Rand|256}}　228
• {{Rand|1000}}　172
• {{Rand|1000|3.14}}　192

```{{#expr: (Minimum) + {{Rand|(Maxium-Minimum)+1）| (seed) | (prime) }}}}
```
• {{#expr: 500 + {{Rand|500}}}}

500-999: 672

### editPads the random number to the specified width

```{{padleft:{{Rand| (range) | (seed) | (prime) }}| (digis) |0}}
```

000-9999: 9347

### editProblem

Template:Rand is using time to generate random number, so two {{Rand}} will cause same result.

If no seed or prime is inputed, they will get same result.

```{{Rand|85000}}、{{Rand|85000}}、{{Rand|85000}}
```

39172, 39172, 39172

If you want to generate two random number, you should use Mod to separate a big number to two.

## editcomparison

• If you just want to display random test, it's more convenient to use <option>.
• <option> cannot work in Parser Functions. Use {{Rand}}.