Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please answer fast only MCQ no need for justifcation MATLAb Consider the following function: function ( 3 ] = grade( x) if x>59 disp ('The

please answer fast only MCQ no need for justifcation MATLAb image text in transcribed
Consider the following function: function ( 3 ] = grade( x) if x>59 disp ('The student's grade is x. He has passed the exam.") Statement 1 disp (Moreover, the student is on the honor list!) else disp('The student has failed.) end end 1. For the dean's honor list, the grade needs to be greater than 84. Therefore, Statement 1 is: a. if (grade >84) b. if (x>84) c. if (x is greater than 84) d. if (x=84) 2. If we want to display the grade of the student and say that he has passed the exam. line 3 should be replaced by: a. There is nothing wrong with line 3. We can keep it as it is. b. fprintf ("The student's grade is %d. He has passed the exam, ',x) c. fprintf ("The student's grade is %d. He has passed the exam, ") d. disp('The student's grade is %x. He has passed the exam.'. x) 3. Considering line 1, which of the following statements is false? a. "x" is the input of the function. b. "[&]" is necessary for the code to run C. "Grade" is the name of the function. d. There is no problem if "Gr" is written in the place of "grade". 4. An "end" is needed right before "else" (line 6). a. True b. False c. True d. False

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Carlos Coronel, Steven Morris

14th Edition

978-0357673034

More Books

Students also viewed these Databases questions