# Result: Manning's n of 0.710
n_direct(2,0.05,0.5)
# Result: Manning's n of 3.216
n_direct(10,0.03,0.25)
# Result: Manning's n of 5.440
n_direct(22,0.12,0.5)
# Result: Hydraulic radius cannot be negative.
n_direct(-2,0.12,0.5)
Run the code above in your browser using DataLab