Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yosefsadek/3294e69a9040fb5432f08095f8d93300 to your computer and use it in GitHub Desktop.
Save yosefsadek/3294e69a9040fb5432f08095f8d93300 to your computer and use it in GitHub Desktop.
بلغة البايثون
#three variables that store the inputs as a decimal (float)
height = float(input("Enter the tank height (cm): "))
width = float(input("Enter the tank width (cm): "))
depth = float(input("Enter the tank depth (cm): "))
#calculation to work out the capacity
capacity = (height * width * depth) / 1000
#outputs the capacity of the water tank
print("The tank holds" + round(capacity,2) + "litres of water")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment