Merging of two functions This is my Arduino code that checks the water Level of two different water reservoirs via 2 water Level Sensors A and B:

#define Water_Level_A 5;
#define Water_Level_B 6;

boolean Water_Level_Check_A(){
boolean Result = digitalRead(Water_Level_A);
return Result;
}
boolean Water_Level_Check_B(){
boolean Result = digitalRead(Water_Level_B);
return Result;
}

void setup() {
    Serial.begin(9600);
    pinMode(Water_Level_A,INPUT);
    pinMode(Water_Level_B,INPUT);
    }

void loop() {
if (Water_Level_Check_A() == LOW){
--&gt; Water Pump A
}
if Water_Level_Check_B() == LOW{
--&gt; Water Pump B
}


What's the best way to simplify this code so that I only need one Water_Level_Check function so that the distinction between A and B and Water_Level_A and Water_Level_B is made within the function and the loop part looks like this:

void loop() {
if (Water_Level_Check_(A) == LOW){
--&gt; Water Pump A 
}
if Water_Level_Check_(B) == LOW{
--&gt; Water Pump B
}
Functions like 

boolean Water_Level_Check_A(){
   boolean Result = digitalRead(Water_Level_A);
   return Result;
}


Are really overcomplicated. You're just calling one function and returning that value, so it can be simplified to 

boolean Water_Level_Check_A(){
   return digitalRead(Water_Level_A);
}


Or just the expression 

digitalRead(Water_Level_A)


whenever you need it. 

So all you're doing is calling digitalRead() on a pin number and check if the result is low. If you really want to move this to a different function then you could give it the pin number argument and directly invert the result so that a true from this function means that some action needs to be done.

boolean Water_Level_Check(int sensorPin){
   return !digitalRead(sensorPin);
}


And then call it as 

void loop() {
   if (Water_Level_Check(Water_Level_A)){
       //--&gt; Water Pump A
   }
   if (Water_Level_Check(Water_Level_B )){
       //--&gt; Water Pump B
   }
}