Ask Question

Write a program to calculate the volume of a cube which contains 27 number of small identical cubes on the basis of the length of small cube input by a user.

+3
Answers (1)
  1. 18 June, 02:42
    0
    This program is written in python programming language.

    The program is self explanatory; hence, no comments was used; However, see explanation section for line by line explanation.

    Program starts here

    length = float (input ("Length of small cube: "))

    volume = 27 * length**3

    print ("Volume: " + (str (volume)))

    Explanation:

    The first line of the program prompts the user for the length of the small cube;

    length = float (input ("Length of small cube: "))

    The volume of the 27 identical cubes is calculated on the next line;

    volume = 27 * length**3

    Lastly, the calculated volume of the 27 cubes is printed

    print ("Volume: " + (str (volume)))
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write a program to calculate the volume of a cube which contains 27 number of small identical cubes on the basis of the length of small ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers