Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
function points = randomGraderandomPoints()
    points = randi([0,100],1,1);
end

d)

Code Block
function hand_WhandWriting = randomHandW()
    temphandWriting = randi([0,1],1,1); 
    if temp 2) == 1
        hand_W = 'fin';
    else 
        hand_W = 'stygg';
    end
    
end

e)

Code Block
function grades()
    points = randomGraderandomPoints();
    hand_WhandWriting = randomHandW();
    grade = evaluateGrade(points,hand_WhandWriting);
	if handWriting
    fprintf('Du fikk %d poeng på eksamen, en %s. Fordi du skrev %stfint ble dette en %s\n',points,num2grade(points), grade);
	else
	fprintf('Du fikk %d poeng på eksamen, hand_W en %s. Fordi du skrev stygt ble dette en %s\n',points,num2grade(points), grade);
	end
end