Adding the function for generating an if statement tasks