Programming Coding Kata #4 Exercise

preview_player
Показать описание
You have a random generator from 0-1. Build something
to measure how many loops it takes on average
to add the random number to get the number 1
Рекомендации по теме
Комментарии
Автор

i am going with the following pseudocode formula:

(N - N1) / 2

where
N = total no. of permutations,
N1 = no. of permutations that give exactly 1

TheJAT
Автор

@GoGreenDeals of course greater or equal :)

programmersbook
Автор

Should it stop on 1.0 exactly...or can it be greater than 1?

MalcolmNewsome
join shbcf.ru