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
9. Question
Gennadij [26K]
A server stopped provide service to 100 users
5 0
3 years ago
The default page orientation in a microsoft excel worksheet is landscape true false
kobusy [5.1K]
To answer your question it is false. This is because excels default orientation is portrait
6 0
3 years ago
Que implicaciones sociales puede tener la robótica
wolverine [178]
Según estos estudios, el impacto de los robots en la productividad ya se compara con la contribución de las máquinas de vapor en el pasado. ... Algunos de los aumentos en la productividad que se derivan de la densificación de los robots se comparten con los trabajadores mediante el pago de salarios más altos.
8 0
3 years ago
What is the symbol that causes the computer to perform string concatenation?
neonofarm [45]

Answer: In java the symbol "+" operator is used to perform string concatenation.

Explanation:

String concatenation refers to joining of two strings. So in java + is used to join strings which works provided one of the operands must be a String variable. Then it works by converting the other variable to String variable and joins the second operand to the end of the first operand.

An example of String concatenation is as follows:

int age = 10;

System.out.println("The boys age is " + age);

Output:

The boys age is 10.

here, the age is integer variable but as the phrase "The boys age is" is a String variable so it converts the age to String variable and joins both the Strings.

4 0
3 years ago
Three consecutive even integers heve a sum of 66. find the integers
Drupady [299]
Let us call x the smallest integer<span>. Because the next two </span>numbers<span> are </span>consecutive even integers<span>, we can call represent them as x + 2 and x + 4. We are told the </span>sum<span> of x, x+2, and x+4 is equal to 72. This means that the </span>integers<span> are 22, 24, and 26.</span>
6 0
3 years ago
Other questions:
  • What does BMP stand for?
    10·2 answers
  • What is one of the first power tools you’ll need as electrician
    15·1 answer
  • after placing her insertion point after grandma's kitchen, order the steps Danica needs to follow to insert and format the regis
    12·2 answers
  • Enter key is also known as Return key. (True or false)
    13·2 answers
  • Write a for loop to print all NUM_VALS elements of array hourlyTemp. Separate elements with a comma and space. Ex: If hourlyTemp
    7·1 answer
  • When you are saving a file, what does word suggest by default as the name of the document?
    8·2 answers
  • When you purchase donuts, they come in boxes of 12, so 24 donuts take 2 boxes. All donuts need to be in a box, so if you buy 13
    10·1 answer
  • Snippet 1: check_file_permissions.c #include
    9·1 answer
  • Your task is to build a palindrome from an input string.A palindrome is a word that readsthe same backward or forward. Your code
    12·1 answer
  • he wants to customize the operating system to meet his needs. what types of tools should he use, and what can he do with each?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!