The snapshots of the program source code and the output is provided below. The source code is provided at the end.
Note:-
1. The main function asks the user to enter the length and width of the plot and passes them as argumnets to the "recommended_litres_fertilizers()" function.
2. The length and width of the plot are passed as arguments to the "recommended_litres_fertilizers()" function. The function calculates the recommended number if litres of fertilizer and returns it to the main function.
Algorithm:-
function recommended_litres_fertilizers(length , width):
area <- length*width;
litres_required <- (area/140);
recommended_litres_required <-(litres_required*1.01400);
return recommended_litres_required;
In case any error is encountered while executing the program , inform in the comments.
Output:-
Source code:-
def recommended_litres_fertilizers(length,width): #length and width of the plot are passed as parameters
total_area = length*width #area of the plot
fertilizer_required = (total_area/140) # 1 litre of fertilizer if required for 140 metres square of area
recommended_amount = fertilizer_required*1.01400
return recommended_amount
if __name__=="__main__":
length = int(input("Provide the length of the plot : "))
width = int(input("Provide the width of the plot : "))
print("Recommended amount of fertilizer to be used on this plot : {}".format(recommended_litres_fertilizers(length,width)))