Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to print a message about production readiness.
Prompt Engineering / GenAI
print("Production readiness is important because it ensures [1].")
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing options about training data size instead of real-world use.
Focusing on code speed rather than reliability.
✗ Incorrect
Production readiness means the model works well when used by real users, not just in tests.
2fill in blank
mediumComplete the code to check if a model is ready for production by testing its accuracy.
Prompt Engineering / GenAI
if model_accuracy >= [1]: print("Model is production ready") else: print("Model needs improvement")
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing too low accuracy thresholds like 0.1 or 0.3.
Confusing accuracy with loss values.
✗ Incorrect
A model accuracy of 0.8 or higher is often considered good enough for production use.
3fill in blank
hardFix the error in the code that checks if a model is production ready based on latency.
Prompt Engineering / GenAI
if model_latency [1] 100: print("Ready for production") else: print("Too slow for production")
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>=' which means latency is too high.
Using '==' which is too strict.
✗ Incorrect
Latency should be less than or equal to 100 milliseconds to be production ready.
4fill in blank
hardFill both blanks to create a dictionary of model metrics only if accuracy is above threshold and latency is below limit.
Prompt Engineering / GenAI
metrics = {"accuracy": [1], "latency": [2] if accuracy [3] 0.75 and latency [4] 150 else {} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping comparison operators.
Using wrong variable names.
✗ Incorrect
We include accuracy and latency in metrics if accuracy is greater than 0.75 and latency is less than 150.
5fill in blank
hardFill all three blanks to create a function that returns True if model is production ready based on accuracy, latency, and error rate.
Prompt Engineering / GenAI
def is_ready(accuracy, latency, error_rate): return accuracy [1] 0.85 and latency [2] 100 and error_rate [3] 0.05
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong comparison signs for latency or error rate.
Confusing greater than and less than.
✗ Incorrect
Model is ready if accuracy >= 0.85, latency <= 100, and error_rate < 0.05.