This is the template test cases page for the sandbox of Module:Random. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins and parsers with these links: |
Number
editCode | Main | Sandbox |
---|---|---|
{{#invoke:random|number}}
|
0.83326624931454 | 0.054906306813893 |
{{#invoke:random|number|10}}
|
7 | 6 |
{{#invoke:random|number|10|20}}
|
17 | 20 |
{{#invoke:random|number|500000}}
|
145309 | 114009 |
{{#invoke:random|number|-10}}
|
-1 | -5 |
{{#invoke:random|number|20|10}}
|
17 | 14 |
{{#invoke:random|number|-100|-50}}
|
-83 | -63 |
{{#invoke:random|number|6.5}}
|
5 | 6 |
{{#invoke:random|number|-6.5}}
|
-4 | -4 |
{{#invoke:random|number|-16.5|-6.5}}
|
-12.5 | -11.5 |
- Test randomness with the same input
Code | Main | Sandbox |
---|---|---|
{{#invoke:random|number}}
|
0.92110189465857 | 0.45927292968113 |
{{#invoke:random|number}}
|
0.75405073899499 | 0.46296695920777 |
{{#invoke:random|number}}
|
0.56524641512206 | 0.8595354668142 |
{{#invoke:random|number}}
|
0.39770697820825 | 0.27736838361126 |
{{#invoke:random|number}}
|
0.40140100773489 | 0.69617834067726 |
{{#invoke:random|number}}
|
0.64848873980739 | 0.52912718454801 |
{{#invoke:random|number}}
|
0.067298696407722 | 0.77621539345766 |
{{#invoke:random|number}}
|
0.31438642801456 | 0.60916423779408 |
{{#invoke:random|number}}
|
0.14733574918813 | 0.85625196986657 |
{{#invoke:random|number}}
|
0.95804219085632 | 0.081586533264064 |
{{#invoke:random|number|1000}}
|
884 | 144 |
{{#invoke:random|number|1000}}
|
624 | 19 |
{{#invoke:random|number|1000}}
|
956 | 974 |
{{#invoke:random|number|1000}}
|
84 | 769 |
{{#invoke:random|number|1000}}
|
704 | 637 |
{{#invoke:random|number|1000}}
|
127 | 75 |
{{#invoke:random|number|1000}}
|
594 | 531 |
{{#invoke:random|number|1000}}
|
27 | 965 |
{{#invoke:random|number|1000}}
|
902 | 398 |
{{#invoke:random|number|1000}}
|
894 | 831 |
Same number
editCode | Main | Sandbox |
---|---|---|
{{#invoke:random|number|same=yes}}
|
0.076076110394707 | 0.076076110394707 |
{{#invoke:random|number|same=yes|10}}
|
9 | 9 |
{{#invoke:random|number|same=yes|10|20}}
|
18 | 18 |
{{#invoke:random|number|same=yes|500000}}
|
408908 | 408908 |
{{#invoke:random|number|same=yes|-10}}
|
-8 | -8 |
{{#invoke:random|number|same=yes|20|10}}
|
18 | 18 |
{{#invoke:random|number|same=yes|-100|-50}}
|
-59 | -59 |
{{#invoke:random|number|same=yes|6.5}}
|
6 | 6 |
{{#invoke:random|number|same=yes|-6.5}}
|
-5 | -5 |
{{#invoke:random|number|same=yes|-16.5|-6.5}}
|
-8.5 | -8.5 |
- Test randomness with the same input
Code | Main | Sandbox |
---|---|---|
{{#invoke:random|number|same=yes}}
|
0.076076110394707 | 0.076076110394707 |
{{#invoke:random|number|same=yes}}
|
0.076076110394707 | 0.076076110394707 |
{{#invoke:random|number|same=yes}}
|
0.076076110394707 | 0.076076110394707 |
{{#invoke:random|number|same=yes}}
|
0.076076110394707 | 0.076076110394707 |
{{#invoke:random|number|same=yes}}
|
0.076076110394707 | 0.076076110394707 |
{{#invoke:random|number|same=yes}}
|
0.076076110394707 | 0.076076110394707 |
{{#invoke:random|number|same=yes}}
|
0.076076110394707 | 0.076076110394707 |
{{#invoke:random|number|same=yes}}
|
0.076076110394707 | 0.076076110394707 |
{{#invoke:random|number|same=yes}}
|
0.076076110394707 | 0.076076110394707 |
{{#invoke:random|number|same=yes}}
|
0.076076110394707 | 0.076076110394707 |
{{#invoke:random|number|same=yes|1000}}
|
818 | 818 |
{{#invoke:random|number|same=yes|1000}}
|
818 | 818 |
{{#invoke:random|number|same=yes|1000}}
|
818 | 818 |
{{#invoke:random|number|same=yes|1000}}
|
818 | 818 |
{{#invoke:random|number|same=yes|1000}}
|
818 | 818 |
{{#invoke:random|number|same=yes|1000}}
|
818 | 818 |
{{#invoke:random|number|same=yes|1000}}
|
818 | 818 |
{{#invoke:random|number|same=yes|1000}}
|
818 | 818 |
{{#invoke:random|number|same=yes|1000}}
|
818 | 818 |
{{#invoke:random|number|same=yes|1000}}
|
818 | 818 |
Date
editCode | Main | Sandbox |
---|---|---|
{{#invoke:random|date}}
|
21:35, 07 September 2024 (UTC) | 06:44, 12 June 2024 (UTC) |
{{#invoke:random|date|1 Jan 2000}}
|
22:16, 02 June 1979 (UTC) | 00:29, 25 February 1972 (UTC) |
{{#invoke:random|date|1 Jan 2000|27 July 2176}}
|
07:26, 25 August 2037 (UTC) | 16:57, 10 July 2158 (UTC) |
{{#invoke:random|date|1000|2000|format=Y}}
|
1407 | 1080 |
{{#invoke:random|date|2000|1000|format=Y}}
|
Module:Random error: the start date must not be later than the end date (start date: "2000", end date: "1000"). | Module:Random error: the start date must not be later than the end date (start date: "2000", end date: "1000"). |
{{#invoke:random|date|format=Y/m/d H:i}}
|
2024/03/19 01:49 | 2024/05/10 02:46 |
Item
editCode | Main | Sandbox |
---|---|---|
{{#invoke:random|item|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
sausage | beans |
{{#invoke:random|item|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
Lobster Thermidor | sausage |
List
editCode | Main | Sandbox |
---|---|---|
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
baconbeanssausageLobster Thermidoreggspam | beansspamLobster Thermidorsausageeggbacon |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
sausagebeansbaconLobster Thermidoreggspam | spamsausagebeanseggbaconLobster Thermidor |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=dot}}
|
egg · spam · bacon · beans · Lobster Thermidor · sausage | spam · egg · beans · sausage · Lobster Thermidor · bacon |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=pipe}}
|
Lobster Thermidor | sausage | spam | egg | beans | Lobster Thermidor | beans | sausage | spam | egg |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=comma}}
|
egg, beans, spam, Lobster Thermidor, bacon, sausage | bacon, spam, Lobster Thermidor, egg, sausage, beans |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=tpt-languages}}
|
bacon⧼tpt-languages-separator⧽beans⧼tpt-languages-separator⧽spam⧼tpt-languages-separator⧽egg⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽sausage | beans⧼tpt-languages-separator⧽spam⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽egg⧼tpt-languages-separator⧽sausage⧼tpt-languages-separator⧽bacon |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space}}
|
Lobster Thermidor sausage beans bacon egg spam | Lobster Thermidor beans bacon spam sausage egg |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=...}}
|
sausage...Lobster Thermidor...spam...bacon...beans...egg | bacon...egg...beans...spam...sausage...Lobster Thermidor |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
spamLobster Thermidorbeanssausage | eggLobster Thermidorbeansspam |
Text list
editCode | Main | Sandbox |
---|---|---|
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
beans, sausage, spam, bacon, egg and Lobster Thermidor | spam, bacon, sausage, Lobster Thermidor, beans and egg |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
beans, Lobster Thermidor, sausage, egg, spam and bacon | egg, bacon, beans, spam, sausage and Lobster Thermidor |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=dot}}
|
sausage · bacon · beans · spam · Lobster Thermidor and egg | sausage · egg · beans · spam · Lobster Thermidor and bacon |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=pipe}}
|
sausage | Lobster Thermidor | egg | beans and bacon | Lobster Thermidor | sausage | beans | egg and bacon |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=comma}}
|
Lobster Thermidor, beans, spam, egg, sausage and bacon | beans, Lobster Thermidor, sausage, egg, spam and bacon |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=tpt-languages}}
|
spam⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽bacon⧼tpt-languages-separator⧽beans⧼tpt-languages-separator⧽egg and sausage | egg⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽sausage⧼tpt-languages-separator⧽beans⧼tpt-languages-separator⧽bacon and spam |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space}}
|
egg bacon sausage Lobster Thermidor spam and beans | egg sausage beans Lobster Thermidor bacon and spam |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=...}}
|
egg...beans...spam...sausage...bacon and Lobster Thermidor | Lobster Thermidor...spam...egg...sausage...bacon and beans |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space|conj=...}}
|
Lobster Thermidor bacon sausage egg spam...beans | spam Lobster Thermidor bacon egg beans...sausage |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|conj=... and }}
|
sausage, Lobster Thermidor, bacon, egg, beans... and spam | egg, sausage, bacon, beans, spam... and Lobster Thermidor |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
egg, bacon, spam and beans | egg, beans, bacon and spam |
Bulleted list
editCode | Main | Sandbox |
---|---|---|
{{#invoke:random|bulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
|
|
{{#invoke:random|bulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
|
|
|
{{#invoke:random|bulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
|
|
|
{{#invoke:random|bulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
|
|
Unbulleted list
editCode | Main | Sandbox |
---|---|---|
{{#invoke:random|unbulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
|
|
{{#invoke:random|unbulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
|
|
|
{{#invoke:random|unbulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
|
|
|
{{#invoke:random|unbulleted_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
|
|
Horizontal list
editCode | Main | Sandbox |
---|---|---|
{{#invoke:random|horizontal_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
|
|
{{#invoke:random|horizontal_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
|
|
|
{{#invoke:random|horizontal_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
|
|
|
{{#invoke:random|horizontal_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
|
|
Ordered list
editCode | Main | Sandbox |
---|---|---|
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
|
|
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
|
|
|
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
|
|
|
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|list_style_type=lower greek}}
|
|
|
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|type=I}}
|
|
|
{{#invoke:random|ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
|
|
Horizontal ordered list
editCode | Main | Sandbox |
---|---|---|
{{#invoke:random|horizontal_ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
|
|
{{#invoke:random|horizontal_ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|style=color: green}}
|
|
|
{{#invoke:random|horizontal_ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|item2_style=color: green|item4_style=color: orange}}
|
|
|
{{#invoke:random|horizontal_ordered_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
|
|
Random link
editCode | Main | Sandbox |
---|---|---|
{{#invoke:random|link|Aristotle}}
|
Script error: The function "link" does not exist. | Script error: The function "link" does not exist. |