I have three levels. I want to make randomize for a question for each level. For
ID: 3802206 • Letter: I
Question
I have three levels. I want to make randomize for a question for each level. For example, the first level contains 5 question. I do not want the same question appear when I start the game. I want to shuffle the question for each level.
long a condition 1.3 3atl3rled if wrong answer 2 $condition if the total number of answers is greater than one. Scoret mytotal score correct2 answer, correct answer, correctl answer disp you lose &displays; this message if the condition is satisfied return function to stop the whole game if the condition is satisfied end choice menu ('What was the first electronic computer called? pple ENIAC ACORN Computer if choice 1 a: correct answer Correct answer-1; disp Your answer is correct 3displays this message if the condition is satisfied. break tbreaks the loop if condition is satisfied previously end Wrong answer E wrong answer counter Wrong answer disp ('Your answer is incorrect &displays; this message if the condition is satisfied endExplanation / Answer
n=5;%number of questions in the level%
l = randi(n);%generating random numbers from 1 to n
%add these lines to your code.. to generate question randomly
%use variable l ,as the index to questions array, where you want the question