10
0
Challenge:
In a hypothetical scenario, the countdown timer for a race has random intervals between the counts, to prevent premature starting, e.g.
3 (0.82 seconds pass), 2 (0.67 seconds pass), 1
Input:
nothing
Output:
Write a program (or function) that prints the 3 numbers with a random time interval from 0.50 seconds to 1 second between each count.
Note:
- The program must output each number (3 , 2 , 1) with the random (any number between 0.50 and 1 to the hundredths; no hard-coding) time interval between each. The precision of the random interval must go out to the hundreds (e.g: 0.52). You are not required to output the interval, only the count.
- As @JoKing clarified, I mean uniformly random (you can use the pseudo-random generator of your language.
- As many people have clarified, I really mean any 2-decimal number between 0.5 and 1. (0.50, 0.51, etc, all the way to 0.98, 0.99, 1)
This is code-golf, so the program with the lowest byte count wins.
4
Hi LordColus, and welcome to PPCG! This seems like a good first challenge. For future challenges, we recommend going through the sandbox first to iron out all the details.
– None – 2018-05-01T03:05:50.7831@LordColus : I improved the original statement and couple of other edits , take a look and approve if you want. – Muhammad Salman – 2018-05-01T14:43:42.933
1As I said in a previous comment that has been deleted, specifying "uniformly random" is fine if you are not too stringent with precision. As it stands now, the pause times must be uniform with precision of two decimals (or is it at least two decimals?). Does that mean the distribution should be uniform on the set 0.5, 0.51, 0.52, ..., 1, or can it be any floating point (possibly with more than two decimals) beween 0.5 and 1? – Luis Mendo – 2018-05-02T10:07:59.683
I mean that it can be any 2-digit decimal between 0.5 and 1 – LordColus – 2018-05-02T11:57:56.007
2Does my most recent edit clear it up? – LordColus – 2018-05-02T12:02:40.533
@LordColus I believe so. I voted to reopen already, so I cannot do it again. – mbomb007 – 2018-05-02T15:29:16.257
6@mbomb007 Same... why did this get closed again? It's basically count from 3 to 1 with two .50-1.00 second waits in between. It's really not complicated. – Magic Octopus Urn – 2018-05-02T17:01:55.860