Μετάβαση στο κύριο περιεχόμενο
🔒 Λειτουργία προεπισκόπησης. Τα πρώτα δεκαπέντε μαθήματα Foundations είναι δωρεάν· αυτό είναι Pro. Ξεκινήστε ένα 7ήμερο trial για να ξεκλειδώσετε τον επεξεργαστή, τις υποδείξεις AI και το υπόλοιπο του προγράμματος. Απαιτείται κάρτα, ακυρώνετε οποιαδήποτε στιγμή από το Dashboard.Ξεκινήστε 7ήμερο trial →
← ΜαθήματαSenior Deep-DivesModule 4 · Memory + profiling · RecapΧειρισμός σφαλμάτων: εξαιρέσεις έναντι τύπων αποτελεσμάτωνquiz86 / 161
+100 XP
Εργασία🌐 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.
🎯 Κουίζ

Ερώτηση

📝 **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.