Show pagesourceOld revisionsBacklinksExport to PDFMoodle_LinkBack to top Share via Share via... Twitter LinkedIn Facebook Pinterest Telegram WhatsApp Yammer Reddit TeamsRecent ChangesSend via e-MailPrintMoodle_LinkPermalink × LU02.L03 - Durchschnitt von Zahlen def average(list): if len(list) > 0: return sum(list)/len(list) else: return 0 if __name__ == '__main__': numbers = [1, 2, 3, 4, 5] print('The average of the numbers is:', average(numbers)) © Kevin Maurizi modul/m323/learningunits/lu02/loesungen/pure3.txt Last modified: 2023/11/13 08:56by 127.0.0.1