Sure. Here is the function, and you might change the type.
```cpp
float calcPerimeter(float sideLength) //The side lenght of the square
{
    return 4 * sideLength;
}
```
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence