Question: Answer the following problems into a single Live Script file. Make each of the problems below a single cell. 1 ( 5 points ) At
Answer the following problems into a single Live Script file. Make each of the problems below a single cell.
points At a local university, each engineering major requires a different number of credits for graduation. For example, recently the requirements were as follows:
tableCivil Engineering,Chemical Engineering,Computer Engineering,Electrical Engineering,Mechanical Engineering,
Prompt the user to select an engineering program from a menu. You must use the menu command. Do some research on how to use this command in Matlab.
Use a switchcase structure to send the minimum number of credits required for graduation back to the command window.
points Edmond Halley the astronomer famous for discovering Halley's comet invented a fast algorithm for computing the square root of a number, A Halley's algorithm approximates as follows: Start with an initial guess The new approximation is then given by
These two calculations are repeated until some convergence criterion, is met.
Using for loop and break statements, write a code that approximates the square root of
Complete five iterations and display results after each iteration and the value of
Compare the last iteration result to the true value found using the sqrt command. Display results up to ten decimal places to see the actual differences in values.
Use tic and toc commands to time the operation.
points A store owner asks you to write a program using the while loop for use in the checkout process.
The program should:
Prompt the user to enter the cost of the first item.
Continue to prompt for additional items, until the user enters
Display the total.
Prompt for the dollar amount the customer submits as payment.
Display the change due.
Sample solution:
You'll need credits to graduate
After five iteration
True value
Elapsed time is seconds.
cost
cost
cost
Your total is $
Your change is $
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
