Folks, I am new to Arduino. Need help to automate water tank (water quantity)

Hello....

So the code i posted above, will it work ? if i use the flooting sensor ?

Please i am new to this so can you please copy paste the code with the <> so that i can see what do you mean ?