Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
modul:m323:learningunits:lu02:loesungen:pure1 [2024/08/28 13:30] kmaurizimodul:m323:learningunits:lu02:loesungen:pure1 [2024/08/28 13:31] (aktuell) kmaurizi
Zeile 16: Zeile 16:
     """     """
     Recursively calculates the sum of a list of numbers.     Recursively calculates the sum of a list of numbers.
-     + 
-    Args: +    :param numbers: A list of integers. 
-        numbers (list): A list of integers. +    :type numbers: list 
-     +    :return: The sum of the numbers in the list
-    Returns: +    :rtype: int 
-        int: The sum of the numbers in the list.+ 
 +    The function operates recursively, summing the first element of the list  
 +    with the sum of the remaining elements. If the list is empty, the function  
 +    returns 0 as the base case.
     """     """
     if not numbers:     if not numbers:
  • modul/m323/learningunits/lu02/loesungen/pure1.1724844607.txt.gz
  • Zuletzt geändert: 2024/08/28 13:30
  • von kmaurizi