Hackerss.com is a community of amazing hackers

Hackerss is a community for developers, data scientitst, ethical hackers, hardware enthusiasts or any person that want to learn / share their knowledge of any aspect of digital technology.

Create account Log in

Posted on

Python Multiply 5 numbers

#create a function that multiplies 5 numbers
def multiply(num1, num2, num3, num4, num5):
    Multiply 5 numbers.

    num1 : int
        First number to multiply.
    num2 : int
        Second number to multiply.
    num3 : int
        Third number to multiply.
    num4 : int
        Fourth number to multiply.
    num5 : int
        Fifth number to multiply.

        The product of ``num1``, ``num2``, ``num3``, ``num4``, and ``num5``.

    #return the product of the 5 numbers
    return num1 * num2 * num3 * num4 * num5

result = multiply(8,15,3,5,7)
print(result)  #1728
Enter fullscreen mode Exit fullscreen mode

Top comments (0)