Question: convert the matlab code to python : tic; h=waitbar(0,'Please wait..'); n = 1000; N = 10000; trials = zeros(N,1); for i = 1:1:N waitbar(i/N) success
convert the matlab code to python :
tic; h=waitbar(0,'Please wait..'); n = 1000; N = 10000; trials = zeros(N,1);
for i = 1:1:N waitbar(i/N) success = 0;
for j = 1:1:n randDiceRoll = ceil(randi([1,6],1,3)); if sum(randDiceRoll) == 18 success = success + 1; end end
trials(i) = success; end
toc;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
