1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Novay_Z [31]
3 years ago
15

he specific gravity of gold is 19.3. Write a MATLAB program that will ask the user to input the mass of a cube of solid gold in

units of kilograms and display the length of a single side of the cube in units of inches. The output should display a sentence like the following one, with the length formatted to two decimal places.

Computers and Technology
1 answer:
Rama09 [41]3 years ago
4 0

Explanation:

Specific gravity of gold = G = 19.3

We know that the specific gravity of gold is given by

G = ρg/ρw

Where ρg is the density of gold and ρw is density of water which is 1000 kg/m³

Now we can find out the density of gold

ρg = G*ρw

ρg = 19.3*1000

ρg = 19300 kg/m³

We also know that density and mass are related as

density = mass/volume

ρg = m/V

where volume of cube is given by

V = s³

Where s is the length of each side

ρg = m/s³

s³ = m/ρg

s = ∛(m/ρg) meters

To convert from meters to inches multiply by 39.37

s = ∛(m/ρg)*39.37 inches

Finally we get the relation of mass and length of side of a gold cube.

Matlab Code:

density = 19300;

% get input from the user that is mass of gold in kg

mass= input('Please input mass of gold in kg\n');

% check if the user has entered valid mass if it is less than or equal to zero then display error

if (mass<=0)

fprintf('Error: Wrong input! please try again');

else

% If the mass is valid then calculate the length of side of the cube

s = (mass/density);

% nthroot() is used to calculate the cube root

s = nthroot(s,3);

% to convert from meters to inches

s = s*39.37;

% finally display the length with 2 decimal points accuracy

fprintf('The length of side of the gold cube is: %.2f inches\n', s);

end

Output:

Please input mass of gold in kg

-2

Error: Wrong input! please try again

Please input mass of gold in kg

0.4

The length of side of the gold cube is: 1.08 inches

You might be interested in
Which of the following is not a characteristic of a healthy relation?
dlinn [17]
Where is the problem at?
5 0
4 years ago
Provide examples of the cost of quality based on your own experiences
Phoenix [80]

Answer:

Cost of quality is define as methodology which basically decide the cost of product and services in an organisation and company. It also determine all the cost which are associated with the quality.

The cost of quality basically divided into four categories that are:

  • Appraisal
  • Prevention
  • External failure
  • Internal failure

Example of the cost of quality is that, in oil refinery industry if the growth of product increased then, the company state also increased. In same way, if there is decrease in the refining state of the product then, the growth of product automatically reduced.

3 0
3 years ago
Explain why regular system cleanup is vital to ensuring the operating system runs efficiently.
Oksanka [162]
Cleaning up a system helps clear up the space on the drives. It may also clear up processor usage, ram usage if you uninstall programs that automatically started when the system booted. You may also delete some unwanted programs in the process.
5 0
3 years ago
Please list 15 safety rules that you think should be practiced in the Computer Technology classroom/lab.
nikklg [1K]

Answer:BE RESPECTFUL! Always treat the computer lab equipment AND your teacher and classmates the way that you would want your belongings and yourself to be treated.

No food or drinks near the computers. NO EXCEPTIONS.

Enter the computer lab quietly and work quietly. There are other groups and individuals who may be using the computer lab. Please be respectful.

Surf safely! Only visit assigned websites. Some web links can contain viruses or malware. Others may contain inapropriate content. If you are not certain that a website is SAFE, please ask a teacher or other adult.

Clean up your work area before you leave. All cords should be placed on the tables (not hanging off the sides). Headphones should be placed on the CPU/tower or monitor. Chair should be pushed under the tables. All trash, papers, and pencils should be picked up.

Do not change computer settings or backgrounds.

Ask permission before you print.

SAVE all unfinished work to a cloud drive or jump drive. Any work that is saved to the computer will be deleted when the computer is powered off or updated at the end of the day.

If you are the last class of the day, please POWER DOWN all computers and monitors.

Keep your files organized

Don’t let a student’s desktop become the digital version of his hectic book bag. Set aside a few minutes at the beginning or end of working on an assignment to ensure that students are saving unfinished work somewhere that they will be able to find it next time.

Log off

Logging off is like the digital version of cleaning up after yourself in the classroom. Students need to leave the computer ready for the next user. Logging off is also important to make sure that student work and accounts stay private.

Each person may only use one computer at a time

Computers and peripherals are not to be moved or reconfigured without approval of Lab and Classrooms staff.

Behavior and activities that disturb other users or disrupt the operations of the lab are not allowed. This includes, but is not limited to: physical activities such as "rough-housing," loud music, etc.

Children are only allowed in computer labs if they are well-behaved and supervised at all times. Children may not use the computers or occupy workstation areas. At no time are children to be left unattended.

.Explanation:

sorry about only 9 rules

4 0
3 years ago
PYTHON CODING LANGUAGE (i am a beginner)
MaRussiya [10]
#let the user input data
Hours = int(input(“enter how many hours were worked”))

Pay_rate = float(input(“Enter the pay rate”))

Pay_amount = Pay_rate * Hours
#calculate the wages


Print (Pay_amount)
#print the final answer
5 0
3 years ago
Other questions:
  • Which one is it A,B,C,D
    10·2 answers
  • What is one way in which tablets differ from laptops and notebooks
    12·2 answers
  • Write a main method that prompts the user for an integer between 1 &amp; 20 (inclusive). If the user enters an invalid number, p
    8·1 answer
  • marco wants to create a heading that is bold and italic to make it really stand out on his webpage. he's typed in the code
    12·2 answers
  • How can an instance variable be used in a class? Explain your answer. (java)
    10·1 answer
  • The company’s computer network is down. Who should you contact to correct this problem? Information Technology Associate Master
    12·1 answer
  • Select the correct answer from each drop-down menu.
    6·2 answers
  • What If smart phones / computers didn't exist? <br>​
    5·1 answer
  • Please help me please
    8·1 answer
  • How many different textile items would you find at a festival? (please list 5 items)
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!