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
Artyom0805 [142]
3 years ago
14

Write a program that accepts as input the mass, in grams, and density, in grams per cubic centimeters, and outputs the volume of

the object using the formula: volume mass / density. Format your output to two decimal places.
Computers and Technology
1 answer:
rewona [7]3 years ago
3 0

Answer:

Program for the above question in python:

mass = float(input("Enter the mass in grams")) # It is used to take the mass as input.  

density = float(input("Enter the density grams per cm cube")) # It is used to take the input for the grams.

print("Volume ={:.2f}".format(mass/density)) #It is used to print the Volume.

Output:

  • If the user inputs as 2.98 and 3.2, then it will results as 0.92.

Explanation:

  • The above code is in python language, in which the first statement is used to take the inputs from the user for the mass and sore it into a mass variable.
  • Then the second statement also takes the input from the user and store it into a density variable.
  • Then the third statement of the code is used to print the volume up to two places using the above-defined formula.
You might be interested in
Which of the following statements represents the number of columns in a regular two-dimensional array named values?
puteri [66]

Answer:

(a) values[0].length

Explanation:

In programming languages such as Java, an array is a collection of data of the same type. For example, a and b below are an example of an array.

a = {5, 6, 7, 9}

b = {{2,3,4}, {3,5,4}, {6,8,5}, {1,4,6}}

But while a is a one-dimensional array, b is a regular two-dimensional array. A two-dimensional array is typically an array of one-dimensional arrays.

Now, a few thing to note about a two-dimensional array:

(i) The number of rows in a 2-dimensional array is given by;

<em>arrayname.length</em>

For example, to get the number of rows in array b above, we simply write;

<em>b.length </em>which will give 4

(ii) The number of columns in a 2-dimensional array is given by;

<em>arrayname[0].length</em>

This is with an assumption that all rows have same number of columns.

To get the number of columns in array b above, we simply write;

<em>b[0].length </em>which will give 3

Therefore, for a regular two-dimensional array named values, the number of columns is represented by: values[0].length

5 0
3 years ago
What are some examples and non-examples of digital security?
deff fn [24]

Answer:

Devices such as a smart card-based USB token, the SIM card in your cell phone, the secure chip in your contactless payment card or an ePassport are digital security devices

5 0
2 years ago
________ is the relative value, either in monetary terms or in overall impact, of the resource being protected by the access con
kherson [118]

Answer:

a. Asset value

Explanation:

Asset value is the value of a share in the company.

The asset value is calculated as

= [ Difference between the total of its assets and its liabilities ] ÷ [ The number of ordinary shares issued ]

The asset value may also be the equal as the book value or the it may be same as equity value of a business.

3 0
3 years ago
Which education level has the highest return on investment (ROI)?
Keith_Richards [23]
The correct option is B.
Having a bachelor degree from a college gives the highest returns on investments. People who go to college usually secure high paying jobs compare to their counterparts who have less education.
The type of college one attends also matter, for instance in USA, the college in the first position, which gives the highest return on investment is Massachusetts Institute of Technology  [MIT].
5 0
3 years ago
Read 2 more answers
A security specialist discovers a malicious script on a computer. The script is set to execute if the administrator's account be
levacccp [35]

The security specialist has discovers a malicious script on a computer known as a logic bomb.

<h3>Is logic bomb a type of malware?</h3>

A logic bomb is known to be a form of a malicious program that is set up or ignited if a logical condition is met, such as after a series of transactions have been done, or on a given date.

Therefore, The security specialist has discovers a malicious script on a computer known as a logic bomb.

Learn more about malware from

brainly.com/question/399317

#SPJ1

7 0
2 years ago
Other questions:
  • 1. Create a view named customer_addresses that shows the shipping and billing addresses for each customer.
    15·1 answer
  • To move to the bottom of a document window, press the ____ key(s). ALT CTRL PAGE DOWN CTRL PAGE DOWN ALT PAGE DOWN PAGE DOWN
    11·1 answer
  • Show what this program prints. Be exact and complete. Can you explain the behavior of each print statement? 1 2 3 4 5 6 7 public
    12·1 answer
  • One is FPGA and other is ASIC. Budget, power consumption, and speed are the common parameters considered for the selection of th
    9·1 answer
  • People use a computer connected to the internet to manage financial accounts
    15·1 answer
  • Henry, a graphic artist, wants to create posters. Which software should Henry use for this purpose?
    13·1 answer
  • A business letter is not written:
    6·1 answer
  • Gun to yo head any last words??
    10·2 answers
  • What are examples of Table Tools options that can help edit data?
    15·2 answers
  • A keyboard would be considered what 2 things
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!