Put the lesson Input and Output into practice by writing a program yourself.
Write a program that asks for the mass and volume of a sample, then prints its density.
The program input is already filled in with a gold sample: 19.32 g and 1.0 cm³. You can change it to test other samples.
input().float().Density: 19.32 g/cm³ (2 decimal places) for the given input.Density: 19.32 g/cm³
Write your program below and press Run. Each run is checked against the expected output.
Press Run to see what your program prints.
One possible solution. Other programs that print the same output are correct too.
mass = float(input("Mass (g): "))volume = float(input("Volume (cm³): "))density = mass / volumeprint(f"Density: {density:.2f} g/cm³")