LU05.L01 - Verwendung von *args in Funktionen

def multiply_all(*args):
    """
    Multiplies all the given numbers together and returns the product.
 
    Parameters:
        *args (float or int): Variable number of arguments to be multiplied.
 
    Returns:
        float or int: The product of all the given numbers.
    """
    product = 1
    for num in args:
        product *= num
    return product
  • modul/m323/learningunits/lu05/loesungen/args.txt
  • Last modified: 2023/11/13 08:56
  • by 127.0.0.1