Rosetta Code:Village Pump/Suggest a programming task: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 709:
=== ICMP Ping ===
Send an ICMP ping to some local resource, such as the current default gateway or even just 127.0.0.1 or ::1, and display information about the response or the absence of the response.
 
== Weighted Random ==
Pick a random item from a list of dozen items, where each item has different weight (rarity).
 
Gaming example: random treasure generation in roguelikes. I've found that this is extremely awkward to do in some languages, and simple in others.
 
=== Generate a Regular Expression for a Range of Integers ===
Line 741 ⟶ 746:
== Partitioning ==
Task for "partition an integer into X primes". For example, partition 19 into 3 primes could return 3+5+11.
 
== Weighted Random ==
Pick a random item from a list of dozen items, where each item has different weight (rarity).
 
Gaming example: random treasure generation in roguelikes. I've found that this is extremely awkward to do in some languages, and simple in others.
 
<br>
5

edits