being more specific, there were total of 8 questions carrying 10 marks for a correct answer and -1 for wrong answer and 0 for an unattended question. how to evaluate it?
Grading the students performance.
    7 次查看(过去 30 天)
  
       显示 更早的评论
    
Given the correct key in the form of an array correct_key='.........'; write a program to evaluate the grade of a student from the answer key. use -1 if answer is wrong, 10 if answer is correct and 0 if no answer.
采纳的回答
  MA
      
 2014-11-13
        %w=wrong
%c=correct
%o=unanswered
syms w c o
s=0;
for i=1:5
    g(i)=input('answer=  ');
    if g(i)==w
        s=s-1;
    elseif g(i)==c
        s=s+10;
    elseif g(i)==o
        s=s+0;
    end
end
display('grade')
display(s)
更多回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

