Module:Random/testcases
Appearance
![]() | 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
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|number}}
|
0.1170827416317 | 0.58211697851406 |
{{#invoke:random|number|10}}
|
3 | 7 |
{{#invoke:random|number|10|20}}
|
16 | 20 |
{{#invoke:random|number|500000}}
|
175071 | 142811 |
{{#invoke:random|number|-10}}
|
-1 | -4 |
{{#invoke:random|number|20|10}}
|
12 | 13 |
{{#invoke:random|number|-100|-50}}
|
-51 | -79 |
{{#invoke:random|number|6.5}}
|
2 | 6 |
{{#invoke:random|number|-6.5}}
|
-3 | -5 |
{{#invoke:random|number|-16.5|-6.5}}
|
-13.5 | -14.5 |
- Test randomness with the same input
Code | Main | Sandbox |
---|---|---|
{{#invoke:random|number}}
|
0.83749206077191 | 0.37566404900312 |
{{#invoke:random|number}}
|
0.91383508402567 | 0.45200659541972 |
{{#invoke:random|number}}
|
0.35760443348326 | 0.01931981137922 |
{{#invoke:random|number}}
|
0.557979127652 | 0.096151115883212 |
{{#invoke:random|number}}
|
0.21969498191946 | 0.34323884795571 |
{{#invoke:random|number}}
|
0.88141035981542 | 0.59081533811559 |
{{#invoke:random|number}}
|
0.71387139973877 | 0.25253071554589 |
{{#invoke:random|number}}
|
0.79070222787126 | 0.7943962573979 |
{{#invoke:random|number}}
|
0.91842888152154 | 0.4561116348282 |
{{#invoke:random|number}}
|
0.92163462979795 | 0.43805249661117 |
{{#invoke:random|number|1000}}
|
29 | 847 |
{{#invoke:random|number|1000}}
|
785 | 163 |
{{#invoke:random|number|1000}}
|
100 | 422 |
{{#invoke:random|number|1000}}
|
426 | 793 |
{{#invoke:random|number|1000}}
|
612 | 549 |
{{#invoke:random|number|1000}}
|
927 | 423 |
{{#invoke:random|number|1000}}
|
124 | 345 |
{{#invoke:random|number|1000}}
|
32 | 243 |
{{#invoke:random|number|1000}}
|
30 | 259 |
{{#invoke:random|number|1000}}
|
928 | 157 |
Same number
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|number|same=yes}}
|
0.99948741588718 | 0.99948741588718 |
{{#invoke:random|number|same=yes|10}}
|
2 | 2 |
{{#invoke:random|number|same=yes|10|20}}
|
11 | 11 |
{{#invoke:random|number|same=yes|500000}}
|
76269 | 76269 |
{{#invoke:random|number|same=yes|-10}}
|
-1 | -1 |
{{#invoke:random|number|same=yes|20|10}}
|
11 | 11 |
{{#invoke:random|number|same=yes|-100|-50}}
|
-93 | -93 |
{{#invoke:random|number|same=yes|6.5}}
|
1 | 1 |
{{#invoke:random|number|same=yes|-6.5}}
|
0 | 0 |
{{#invoke:random|number|same=yes|-16.5|-6.5}}
|
-15.5 | -15.5 |
- Test randomness with the same input
Code | Main | Sandbox |
---|---|---|
{{#invoke:random|number|same=yes}}
|
0.99948741588718 | 0.99948741588718 |
{{#invoke:random|number|same=yes}}
|
0.99948741588718 | 0.99948741588718 |
{{#invoke:random|number|same=yes}}
|
0.99948741588718 | 0.99948741588718 |
{{#invoke:random|number|same=yes}}
|
0.99948741588718 | 0.99948741588718 |
{{#invoke:random|number|same=yes}}
|
0.99948741588718 | 0.99948741588718 |
{{#invoke:random|number|same=yes}}
|
0.99948741588718 | 0.99948741588718 |
{{#invoke:random|number|same=yes}}
|
0.99948741588718 | 0.99948741588718 |
{{#invoke:random|number|same=yes}}
|
0.99948741588718 | 0.99948741588718 |
{{#invoke:random|number|same=yes}}
|
0.99948741588718 | 0.99948741588718 |
{{#invoke:random|number|same=yes}}
|
0.99948741588718 | 0.99948741588718 |
{{#invoke:random|number|same=yes|1000}}
|
153 | 153 |
{{#invoke:random|number|same=yes|1000}}
|
153 | 153 |
{{#invoke:random|number|same=yes|1000}}
|
153 | 153 |
{{#invoke:random|number|same=yes|1000}}
|
153 | 153 |
{{#invoke:random|number|same=yes|1000}}
|
153 | 153 |
{{#invoke:random|number|same=yes|1000}}
|
153 | 153 |
{{#invoke:random|number|same=yes|1000}}
|
153 | 153 |
{{#invoke:random|number|same=yes|1000}}
|
153 | 153 |
{{#invoke:random|number|same=yes|1000}}
|
153 | 153 |
{{#invoke:random|number|same=yes|1000}}
|
153 | 153 |
Date
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|date}}
|
14:26, 26 September 2024 (UTC) | 20:24, 23 April 2024 (UTC) |
{{#invoke:random|date|1 Jan 2000}}
|
08:30, 05 April 1985 (UTC) | 21:45, 11 December 1990 (UTC) |
{{#invoke:random|date|1 Jan 2000|27 July 2176}}
|
07:47, 14 September 2028 (UTC) | 09:59, 03 April 2030 (UTC) |
{{#invoke:random|date|1000|2000|format=Y}}
|
1907 | 1879 |
{{#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/08/06 07:34 | 2024/06/21 04:06 |
Item
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|item|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
sausage | egg |
{{#invoke:random|item|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
sausage | egg |
List
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
spameggsausageLobster Thermidorbaconbeans | eggbeansbaconLobster Thermidorsausagespam |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
baconLobster Thermidorbeansspameggsausage | spambeanseggLobster Thermidorbaconsausage |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=dot}}
|
Lobster Thermidor · bacon · spam · sausage · egg · beans | spam · Lobster Thermidor · egg · sausage · beans · bacon |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=pipe}}
|
egg | Lobster Thermidor | sausage | bacon | spam | egg | beans | Lobster Thermidor | bacon | spam |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=comma}}
|
spam, beans, egg, sausage, bacon, Lobster Thermidor | Lobster Thermidor, sausage, egg, spam, beans, bacon |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=tpt-languages}}
|
spam⧼tpt-languages-separator⧽sausage⧼tpt-languages-separator⧽bacon⧼tpt-languages-separator⧽egg⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽beans | egg⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽bacon⧼tpt-languages-separator⧽sausage⧼tpt-languages-separator⧽spam⧼tpt-languages-separator⧽beans |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space}}
|
spam sausage egg Lobster Thermidor beans bacon | bacon Lobster Thermidor egg beans spam sausage |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=...}}
|
beans...sausage...Lobster Thermidor...egg...bacon...spam | sausage...beans...egg...spam...Lobster Thermidor...bacon |
{{#invoke:random|list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
Lobster Thermidorbeanseggsausage | sausageeggbaconLobster Thermidor |
Text list
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
sausage, egg, beans, Lobster Thermidor, bacon and spam | Lobster Thermidor, spam, sausage, beans, bacon and egg |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor}}
|
spam, beans, Lobster Thermidor, sausage, egg and bacon | bacon, Lobster Thermidor, spam, sausage, beans and egg |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=dot}}
|
egg · Lobster Thermidor · bacon · spam · sausage and beans | Lobster Thermidor · bacon · beans · spam · sausage and egg |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=pipe}}
|
spam | egg | beans | sausage and Lobster Thermidor | bacon | beans | egg | Lobster Thermidor and spam |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=comma}}
|
spam, bacon, sausage, Lobster Thermidor, beans and egg | spam, bacon, Lobster Thermidor, sausage, beans and egg |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=tpt-languages}}
|
beans⧼tpt-languages-separator⧽bacon⧼tpt-languages-separator⧽Lobster Thermidor⧼tpt-languages-separator⧽spam⧼tpt-languages-separator⧽egg and sausage | Lobster Thermidor⧼tpt-languages-separator⧽bacon⧼tpt-languages-separator⧽egg⧼tpt-languages-separator⧽sausage⧼tpt-languages-separator⧽beans and spam |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space}}
|
egg spam bacon beans sausage and Lobster Thermidor | beans spam egg bacon sausage and Lobster Thermidor |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=...}}
|
Lobster Thermidor...spam...beans...egg...sausage and bacon | Lobster Thermidor...spam...egg...beans...sausage and bacon |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|sep=space|conj=...}}
|
egg spam beans bacon Lobster Thermidor...sausage | Lobster Thermidor spam bacon egg sausage...beans |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|conj=... and }}
|
sausage, Lobster Thermidor, spam, beans, bacon... and egg | Lobster Thermidor, egg, bacon, beans, sausage... and spam |
{{#invoke:random|text_list|egg|spam|beans|sausage|bacon|Lobster Thermidor|limit=4}}
|
bacon, spam, egg and beans | sausage, Lobster Thermidor, bacon and spam |
Bulleted list
[edit]Code | 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
[edit]Code | 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
[edit]Code | 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
[edit]Code | 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
[edit]Code | 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
[edit]Code | Main | Sandbox |
---|---|---|
{{#invoke:random|link|Aristotle}}
|
Script error: The function "link" does not exist. | Script error: The function "link" does not exist. |