Preskoči na glavni sadržaj
🔒 Način pregleda. Prvih petnaest Foundations lekcija je besplatno; ova je Pro. Pokrenite 7-dnevni trial da otključate editor, AI savjete i ostatak programa. Kartica obavezna, otkažite bilo kada u Dashboard.Pokreni 7-dnevni trial →
← KolegijiSenior Deep-DivesModule 4 · Memory + profiling · RecapRješavanje pogrešaka: iznimke u odnosu na vrste rezultataquiz86 / 161
+100 XP
Zadatak🌐 shown in EN
📝 **Task:** Build a small \`memory_estimator(rows, bytes_per_row, overhead_pct)\` that returns total memory in MB (float, 2 decimals): \`\`\` total_bytes = rows * bytes_per_row * (1 + overhead_pct / 100) mb = total_bytes / 1_000_000 # decimal MB — matches Prometheus/Grafana convention return round(mb, 2) \`\`\` Test for 3 realistic scales: small in-memory cache, mid-size pandas DataFrame, large Redis dataset. 📋 Implement the function above. Tests run automatically. 💡 **Hint:** Re-read the theory if you get stuck.
🎯 Kviz

Pitanje

📝 **Task:** Build a small \`memory_estimator(rows, bytes_per_row, overhead_pct)\` that returns total memory in MB (float, 2 decimals): \`\`\` total_bytes = rows * bytes_per_row * (1 + overhead_pct / 100) mb = total_bytes / 1_000_000 # decimal MB — matches Prometheus/Grafana convention return round(mb, 2) \`\`\` Test for 3 realistic scales: small in-memory cache, mid-size pandas DataFrame, large Redis dataset. 📋 Implement the function above. Tests run automatically. 💡 **Hint:** Re-read the theory if you get stuck.