current position:Home>There are 60 items in the question bank, numbered from 1, 2, 3 to 60

There are 60 items in the question bank, numbered from 1, 2, 3 to 60

2022-01-26 23:53:01 CSDN Q & A

Question bank has 60 questions , Title number 1,2,3....60, Each student drawers in turn , Each student gets different questions , When drawn, the screen shows “ congratulations , Draw to No topic ”.




Refer to the answer 1:

The basic logic is that the extraction probability is independent of the extraction order , Can be 1,2,3,...,60 Arrange randomly , Then assign them to the students who come to draw questions in turn , The procedure is as follows .

M=1:1:60;[r,c]=size(M);vector = randperm(c);for i=1:cdisp(['“ congratulations , Draw to No ',num2str(vector(i)),' topic ”']);end



Refer to the answer 2:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/01/202201262352599591.html

Random recommended