1. Homepage
  2. Exam
  3. [2019] ENG 1002 Programming (Matlab and C) - Semester 1 - Primary Examination - Q9 Problem Solving, Design, Implementation and Testing in MATLAB

[2019] ENG 1002 Programming (Matlab and C) - Semester 1 - Primary Examination - Q9 Problem Solving, Design, Implementation and Testing in MATLAB

This question has been solved
Engage in a Conversation

Question 9 CourseNana.COM

Problem Solving, Design, Implementation and Testing in MATLAB CourseNana.COM


CourseNana.COM

(a) Write a function isPrime(n) that takes an integer n and returns true if the number is prime or false if it is not. Your function must not use the isPrime built in function, but you can use whatever other MATLAB functions you want. A number, n, is not prime if any number between 2 and n/2 divides the number without any remainder.  [8 marks] CourseNana.COM


CourseNana.COM

(b) For the isPrime function above, give three test cases that will test a range of outcomes. For each test case explain what types of inputs that case is testing and give the expected output.  [4 marks] CourseNana.COM

[Total for Question 9: 12 marks] CourseNana.COM

  CourseNana.COM

Get the Solution to This Question

WeChat WeChat
Whatsapp WhatsApp
The University of Adelaide代写,ENG 1002代写,Programming (Matlab and C)代写,C代写,Matlab代写,The University of Adelaide代编,ENG 1002代编,Programming (Matlab and C)代编,C代编,Matlab代编,The University of Adelaide代考,ENG 1002代考,Programming (Matlab and C)代考,C代考,Matlab代考,The University of Adelaidehelp,ENG 1002help,Programming (Matlab and C)help,Chelp,Matlabhelp,The University of Adelaide作业代写,ENG 1002作业代写,Programming (Matlab and C)作业代写,C作业代写,Matlab作业代写,The University of Adelaide编程代写,ENG 1002编程代写,Programming (Matlab and C)编程代写,C编程代写,Matlab编程代写,The University of Adelaideprogramming help,ENG 1002programming help,Programming (Matlab and C)programming help,Cprogramming help,Matlabprogramming help,The University of Adelaideassignment help,ENG 1002assignment help,Programming (Matlab and C)assignment help,Cassignment help,Matlabassignment help,The University of Adelaidesolution,ENG 1002solution,Programming (Matlab and C)solution,Csolution,Matlabsolution,