Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write a script which prompts the user enter the dimensons of a cubic object and calculates its volume and surface area. Next the scriptst

image text in transcribed
1. Write a script which prompts the user enter the dimensons of a cubic object and calculates its volume and surface area. Next the scriptst write the results in the following format in the file called mydata.txt" The volume of the cubic object is 8.000 cm3 The surface of the object is 24.000 cm2 2. Modify the previus problem such that the result for the volume is written in the file "mydata01.txt" and the result for the surface area is written in the file "mydata02.txt 3. Write a script which prompts the user enter the number of the students in his/her classroom and display the following output sing "disp" and "num2str" The number of the students is 23 4. Write a user-defined function called "myfun" which calculates the following function: 3x -4, 1 Sx S 10 f(x)x+2, 2x +4, x>10 5. Fiboacci Numbers can be obtained from Using vectorization method find the sum of the terms which are smaller than 1 105, (Answer: 1.9642 x 10) 6. Solve the previous problem using a while loop, but without a break command 7. Solve the previous problem using an infinite loop and a break command. 1. Write a script which prompts the user enter the dimensons of a cubic object and calculates its volume and surface area. Next the scriptst write the results in the following format in the file called mydata.txt" The volume of the cubic object is 8.000 cm3 The surface of the object is 24.000 cm2 2. Modify the previus problem such that the result for the volume is written in the file "mydata01.txt" and the result for the surface area is written in the file "mydata02.txt 3. Write a script which prompts the user enter the number of the students in his/her classroom and display the following output sing "disp" and "num2str" The number of the students is 23 4. Write a user-defined function called "myfun" which calculates the following function: 3x -4, 1 Sx S 10 f(x)x+2, 2x +4, x>10 5. Fiboacci Numbers can be obtained from Using vectorization method find the sum of the terms which are smaller than 1 105, (Answer: 1.9642 x 10) 6. Solve the previous problem using a while loop, but without a break command 7. Solve the previous problem using an infinite loop and a break command

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

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions

Question

Explain the role estoppel plays in agency law.

Answered: 1 week ago

Question

How many moles of water are there in 1.000 L? How many molecules?

Answered: 1 week ago

Question

What steps should be taken to address any undesirable phenomena?

Answered: 1 week ago