Answer:
def FenceCalculator(L, S):
m = L % S
if m == 0:
segment = int(L/S)
elif m < S:
segment = int(L/S) + 1
print(segment)
Step-by-step explanation:
* The code is in Python
- Create a function FenceCalculator() that takes the length of a fence - L, and the length of one segment of a fence - S, as a parameter
- Get the module of the L respect to S
- If the module is equal to 0, then the segment amount is equal to the integer value of L/S
- If the module is smaller than S, then the segment amount is equal to the integer value of L/S + 1
- Print the segment