def calculate_triangle_area(base, height):
"""
Demonstrates procedural abstraction by calculating the area of a triangle.
Args:
base (float): The base length of the triangle.
height (float): The height of the triangle.
Returns:
float: Area of the triangle.
"""
# Calculate the area of the triangle using the formula: (base * height) / 2
area = (base * height) / 2
return area
# Example usage of procedural_abstraction function
base_length = 6.0
triangle_height = 4.0
area_result = calculate_triangle_area(base_length, triangle_height)
print("Area of the triangle with base", base_length, "and height", triangle_height, "is:", area_result)
def summing_machine(first_number, second_number):
"""
Demonstrates procedural abstraction by calculating the sum of two numbers.
Args:
first_number (int): The first number.
second_number (int): The second number.
Returns:
int: Sum of the input numbers.
"""
# Calculate the sum of two numbers
total_sum = first_number + second_number
# Return the result
return total_sum
# Example usage of summing_machine function
first_number = 7
second_number = 5
# Call the function and store the result
result = summing_machine(first_number, second_number)
# Print the result
print("Sum of", first_number, "and", second_number, "is:", result)