“Apart from everything that has already been said here: why do you divide the height by 2 to get the radius and then immediately multiply that radius by 2 again, without ever using the radius???”
Since the initial formula is 2π R. Just a safety measure so nobody would ask “where this radius came from?”
Don’t think you need a computer to calculate that.