Deutsch
Telegram

Thread سلام ببخشید این کد برای مرتب سازی انتخابی درست؟

6 Nachrichten · –
🍀
سلام ببخشید این کد برای مرتب سازی انتخابی درست؟ def selection_sort(arr): for i in range(len(arr)): minimum = i for j in range(i + 1, len(arr)): # Select the smallest value if arr[j] < arr[minimum]: minimum = j # Place it at the front of the # sorted end of the array arr[minimum], arr[i] = arr[i], arr[minimum] return arr
    1. 🍀
      ورودی هم دادم ارور میده
          1. G
            WTH? کدتو این‌گونه بزن: def selection_sort(arr): ... .. . جای نقطه چینا همون تابع که تعریف کردی. print(selection_sort([1,4,3])) بزن ببین خروجی چی میده.
PPython + Linux ExpertsPython + Linux Experts@PythonLinuxExperts · Gruppe · Technik
4 287Mitglieder20schreiben in 30 Tagen
Community-Feed In Telegram öffnen

Ein offener öffentlicher Feed aus dem Suchindex ChatCrawler — „Google für das öffentliche Telegram“; wird aktualisiert, während die Community gecrawlt wird. Zeiten in UTC.

Nur öffentliche Inhalte, offizielle Telegram-API. Über uns · FAQ · Grenzen des Index · Seite entfernen · Katalog · Suche · So zählen wir