Liters in a cylinder

Calculate the number of liters
in a cylinder with Python

Go to the menu-list
img alttext

Program-code written in python:

I still need to make a UI, so below the code in front (it works very well on my laptop)

"""Calculate number of liters in cylinder"""

def litersincylinder():
    pi = 3.141592653589793
    radius = 0
    height = 0
    while radius == 0:
        radius = input("radius in cm.? ")
        if radius.isnumeric() == False:
            if radius == ("q"):
                from sys import exit
                exit()
            else:
                radius = 0
                print ("Only numeric values\n")
    while height == 0:
        height = input("height in cm.? ")
        if height.isnumeric() == False:
            if height == ("q"):
                from sys import exit
                exit()
            else:
                height = 0
                print ("Only numeric values\n")
    liters = round((((pi*(int(radius))*int(radius))*int(height))/1000), 2)
    print ("\n\nNumber of liters: ", liters)
    print ("\n")

go_on = ("q")
go_on = input("Any character to continue or \"q\" to quit: ")
print ("\n")
while go_on != ("q"):
    if go_on != ("q"):
        litersincylinder()
    else:
        from sys import exit
        exit()

Not an advertisement, but looks like it

(Not an advertisement) 
Not ads
Genealogie (NL) Portugal life Colorpicker Websafe fonts

Not an advertisement, but looks like it

(Not an advertisement) 
Not ads
Test your website HTDML-coding Troje (NL) Kahlil Gibran

And now for something completely different: