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
Consider the following list. list = {24, 20, 10, 75, 70, 18, 60, 35} Suppose that list is sorted using the selection sort algori
Nadya [2.5K]

Answer:

list =  {10, 18, 24, 75, 70, 20, 60, 35}

Explanation:

Selection is a sorting algorithm that will set a cursor position and search for a minimum number from the list. When the minimum number is found, that minimum number will be swapped with the number in the cursor position. Only one number will be swapped and sorted in one iteration of outer loop. To sort the next number in the following outer loop iteration, the cursor will be moved to the next position and repeat the same search and swapping process as in the first iteration. When finishing all the iterations of outer loop, all numbers shall be sorted in ascending order.

4 0
3 years ago
1. What are copyright laws?
andre [41]
1. Copyright laws protects original works of authorita1. A
7 0
2 years ago
Read 2 more answers
Write a program using integers user_num and x as input, and output user_num divided by x three times.Ex: If the input is:20002Th
HACTEHA [7]

Answer:

Following are the code to the given question:

user_num = int(input())#defining a variable user_num that takes input from user-end

x = int(input())#defining a variable x that takes input from user-end

for j in range(3):#defining for loop that divides the value three times

   user_num = user_num // x#dividing the value and store integer part

   print(user_num)#print value

Output:

2000

2

1000

500

250

Explanation:

In the above-given program code two-variable "user_num and x" is declared that inputs the value from the user-end and define a for loop that uses the "j" variable with the range method.

In the loop, it divides the "user_num" value with the "x" value and holds the integer part in the "user_num" variable, and prints its value.  

5 0
2 years ago
Name this:<br><br>Software that allows us to create dynamic slide presentations. ​
PtichkaEL [24]
I think it is presentation
4 0
2 years ago
Directions: Asba student of Contact Center Service, you already have an experience using different computer programs. Try to rem
ELEN [110]

Explanation:

can u suggest a title about quarantine

ex: My quarantine life

8 0
3 years ago
Read 2 more answers
Other questions:
  • (Java) Can anyone help me with this ?? The skeleton of the code must be same as the image.
    6·1 answer
  • What type of organism forms the base of food webs?
    9·1 answer
  • What is the significant feature of computer capabilities?​
    14·1 answer
  • T F A stub is a dummy function that is called instead of the actual function it<br><br> represents.
    7·1 answer
  • Create a program which will input data into a pipe one character at a time. Count the number of characters as they are written i
    9·1 answer
  • The concept of "plug and play" is demonstrated by which of the following<br> scenarios?
    13·1 answer
  • Convert (520)10 into base 16​
    9·2 answers
  • How to determine the critical crack size for a<br> plate
    15·1 answer
  • I want to start a debate about something
    9·2 answers
  • Question 8 A data analyst is working with a data frame named stores. It has separate columns for city (city) and state (state).
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!