Notes

Parts of a Procedure

A group of programming instructions, also known as methods or functions.
Parameters are input values of a procedure, and arguments are the values of the parameters when the procedure is called.
A procedure call interrupts the sequential execution of statements, executes the procedure's statements, and then returns control to the point immediately following the call.

Procedure Example:

Procedures allow you to reuse sets of instructions, enhancing code reusability.
A procedure in Python is defined using the def keyword and can take parameters.
Parameters are the input values to a procedure, and when you call a procedure, you provide arguments.
A procedure can return a value using the return statement. The returned value can be assigned to a variable and manipulated.

Homework Problem 1

def procedural_abstraction(height, width, length):
    """this code takes three parameters: height, width, length
    then it finds the volume and returns it in a formatted string response
    """
    return f"Volume is {height * width * length} units^3"

Homework Problem 2

def summing_machine(first_number, second_number):
    """
    This function takes two numbers as input and returns their sum.
    """
    return first_number + second_number